
  -spec position(IoDevice, Location) ->
                    {ok, NewPosition} | {error, Reason}
                    when
                        IoDevice :: io_device(),
                        Location :: location(),
                        NewPosition :: integer(),
                        Reason :: posix() | badarg | terminated.

  Sets the position of the file referenced by IoDevice to 
  Location. Returns {ok, NewPosition} (as absolute offset) if
  successful, otherwise {error, Reason}. Location is one of the
  following:

  Offset:
    The same as {bof, Offset}.

  {bof, Offset}:
    Absolute offset.

  {cur, Offset}:
    Offset from the current position.

  {eof, Offset}:
    Offset from the end of file.

  bof | cur | eof:
    The same as above with Offset 0.

  Notice that offsets are counted in bytes, not in characters. If
  the file is opened using some other encoding than latin1, one
  byte does not correspond to one character. Positioning in such a
  file can only be done to known character boundaries. That is, to a
  position earlier retrieved by getting a current position, to the
  beginning/end of the file or to some other position known to be
  on a correct character boundary by some other means (typically
  beyond a byte order mark in the file, which has a known
  byte-size).

  A typical error reason is:

  einval:
    Either Location is illegal, or it is evaluated to a negative
    offset in the file. Notice that if the resulting position is a
    negative value, the result is an error, and after the call the
    file position is undefined.
