fRead

fun CPointer<FILE>.fRead(buf: ByteArray): Int(source)

Reads the contents of FILE into provided ByteArray.

When return value is:

  • Negative: error, check errno

  • 0: no more data to read (break)

  • Positive: buf was filled with that much data starting from 0