fwrite method

int fwrite(
  1. List<int> ptr,
  2. int size,
  3. int count,
  4. FILE stream,
)

Writes an array of count elements, each one with a size of size bytes, to the stream.

Implementation

int fwrite(List<int> ptr, int size, int count, FILE stream) {
  try {
    int bytesToWrite = size * count;
    stream._raf.writeFromSync(ptr, 0, bytesToWrite);
    return count;
  } catch (e) {
    return 0;
  }
}