
  -spec pwrite(IoDevice, Location, Bytes) -> ok | {error, Reason}
                  when
                      IoDevice :: io_device(),
                      Location :: location(),
                      Bytes :: iodata(),
                      Reason :: posix() | badarg | terminated.

  Combines position/2 and write/2 in one operation, which is
  more efficient than calling them one at a time.

  Location is only allowed to be an integer for raw and ram
  modes.

  The current position of the file after the operation is undefined
  for raw mode and unchanged for ram mode.

  When positioning in a file with other encoding than latin1,
  caution must be taken to set the position on a correct character
  boundary. For details, see position/2.
