IO.getn

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

getn(prompt, count \\ 1)

View Source

Specs

Gets a number of bytes from IO device :stdio.

If :stdio is a Unicode device, count implies the number of Unicode code points to be retrieved. Otherwise, count is the number of raw bytes to be retrieved.

See IO.getn/3 for a description of return values.

Link to this function

getn(device, prompt, count)

View Source

Specs

Gets a number of bytes from the IO device.

If the IO device is a Unicode device, count implies the number of Unicode code points to be retrieved. Otherwise, count is the number of raw bytes to be retrieved.

It returns:

  • data - the input characters

  • :eof - end of file was encountered

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