IO.read

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

read(device \\ :stdio, line_or_chars)

View Source

Specs

read(device(), :all | :line | non_neg_integer()) :: chardata() | nodata()

Reads from the IO device.

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

It returns:

  • data - the output characters

  • :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.