Functions handling IO.
Many functions in this module expects an IO device as argument.
An IO device must be a pid or an atom representing a process.
For convenience, Elixir provides :stdio
and :stderr
as
shortcuts to Erlang's :standard_io
and :standard_error
.
The majority of the functions expect char data, i.e. strings or
lists of characters and strings. In case another type is given,
it will do a conversion to string via the String.Chars
protocol
(as shown in typespecs).
The functions starting with bin*
expects iodata as argument,
i.e. binaries or lists of bytes and binaries.
IO devices
An IO device may be an atom or a pid. In case it is an atom, the atom must be the name of a registered process. However, there are three exceptions for this rule:
:standard_io
- when the:standard_io
atom is given, it is treated as a shortcut forProcess.group_leader
:stdio
- is a shortcut for:standard_io
:stderr
- is a shortcut for:standard_error