IO.binread

You're seeing just the function binread, go back to IO module for more information.
Link to this function

binread(device \\ :stdio, line_or_chars)

View Source

Specs

binread(device(), :all | :line | non_neg_integer()) :: iodata() | nodata()

Reads from the IO device. The operation is Unicode unsafe.

The device is iterated by the given number of bytes or line by line if :line is given. Alternatively, if :all is given, then whole device is returned.

It returns:

  • data - the output bytes

  • :eof - end of file was encountered

  • {:error, reason} - other (rare) error condition; for instance, {:error, :estale} if reading from an NFS volume

If :all is given, :eof is never returned, but an empty string in case the device has reached EOF.

Note: do not use this function on IO devices in Unicode mode as it will return the wrong result.