
  -spec truncate(IoDevice) -> ok | {error, Reason}
                    when
                        IoDevice :: io_device(),
                        Reason :: posix() | badarg | terminated.

  Truncates the file referenced by IoDevice at the current
  position. Returns ok if successful, otherwise {error, Reason}.
