fread method
Reads an array of count elements, each one with a size of size bytes, from the stream.
Implementation
int fread(List<int> ptr, int size, int count, FILE stream) {
try {
int bytesToRead = size * count;
int bytesRead = stream._raf.readIntoSync(ptr, 0, bytesToRead);
if (bytesRead == 0 && bytesToRead > 0) {
stream._isEOF = true;
}
return bytesRead ~/ size;
} catch (e) {
return 0;
}
}