libfilezilla
Public Types | Public Member Functions | Public Attributes | List of all members
rwresult Class Referencefinal

Holds the result of read/write operations. More...

#include <fsresult.hpp>

Public Types

enum  error {
  none, invalid, nospace, wouldblock,
  other
}
 
typedef uint32_t raw_t
 

Public Member Functions

 rwresult (error e, raw_t raw)
 
 rwresult (size_t value)
 
 operator bool () const
 

Public Attributes

error error_ {}
 
union {
   raw_t   raw_
 Undefined if error_ is none.
 
   size_t   value_ {}
 Undefined if error_ is not none.
 
}; 
 

Detailed Description

Holds the result of read/write operations.

On success, returns the number of bytes read/written.

The raw error code isn't always available. If available, it is the value of errno/GetLastError() when the failure occurred.

Examples:
nonblocking_process.cpp, and process.cpp.

Member Enumeration Documentation

enum error
Enumerator
invalid 

Invalid arguments, syntax error.

nospace 

Out of disk space.

wouldblock 

The operation would have blocked, but the file descriptor is marked non-blocking.

other 

Some other error.


The documentation for this class was generated from the following file: