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

  Performs a sequence of pwrite/3 in one operation, which is more
  efficient than calling them one at a time. Returns ok or 
  {error, {N, Reason}}, where N is the number of successful
  writes done before the failure.

  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.
