Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
File and Socket I/O

Buffer, file and socket I/O operations

The File object implements an OS independent set of I/O tools.

A File object can be constructed from:

  • Empty with no preopened object.
  • An open file descriptor.
  • (char*) buffer (for writing).
  • (char**) buffer (for reading).
  • (wchar_t*) buffer (for writing).
  • (wchar_t**) buffer (for reading).

When constructing a File object from an preopened object, it must be opened in the same mode (opened for read, or opened for write).

Note
The File object calls pthread_sigmask(SIG_BLOCK, ..SIGPIPE.., nullptr) blocking SIGPIPE for socket I/O. Errors are returned by throwing an (Error_t*), or a return value less that the amount requested to be written or read from a pipe.