108 size_t len,
int* error);
The root namespace for WFIO.
Definition: bin.h:879
WFIO_DLL_FASTCALL wfio_off_t wfio_fd_tell(wfio_fd_t fd, int *error)
Determine the current stream position of this file descriptor.
WFIO_DLL_FASTCALL int wfio_fd_vioctl(wfio_fd_t fd, int cmd, int *error, va_list va)
Perform device-dependent I/O control on the supplied file descriptor.
#define WFIO_DLL
Mark the symbol as an element of the library.
Definition: host.h:397
WFIO_C_BEGIN typedef long int wfio_off_t
An integer corresponding to a device offset.
Definition: iotype.h:48
#define WFIO_C_BEGIN
Definition: host.h:477
#define WFIO_DLL_FASTCALL
Shorthand for WFIO_DLL WFIO_FASTCALL.
Definition: host.h:425
WFIO_DLL int wfio_fd_getflags(wfio_fd_t fd, int *error)
Obtain the device flags corresponding to the file descriptor fd.
wfio_whence_t
The type corresponding to the point of reference in a seek operation.
Definition: iotype.h:60
WFIO_INLINE int wfio_fd_ioctl(wfio_fd_t fd, int cmd, int *error,...)
Perform device-dependent I/O control on the supplied file descriptor.
Definition: fd.h:183
WFIO_DLL wfio_fd_t wfio_fd_openEx(const char *path, wfio_openmode_t mode, int *error)
Open a new file descriptor for the given path and in the specified openmode mode. ...
FDDevice(wfio_fd_t fd, int *error=NULL)
Construct a new FDDevice from a file descriptor.
Definition: fd.h:250
int wfio_fd_t
The type corresponding a file descriptor.
Definition: iotype.h:108
WFIO_DLL_FASTCALL wfio_fd_t wfio_fd_dup(wfio_fd_t fd, int *error)
Duplicate a file descriptor.
WFIO_DLL_FASTCALL int wfio_fd_seek(wfio_fd_t fd, wfio_off_t offset, wfio_whence_t whence, int *error)
Seek to a position in the file descriptor's stream.
A C++ wrapper for a wfio_device_t.
Definition: device.h:783
WFIO_DLL_FASTCALL size_t wfio_fd_write(wfio_fd_t fd, const void *buf, size_t len, int *error)
Write to a file descriptor.
WFIO_C_BEGIN WFIO_DLL struct wfio_device_t * wfio_device_from_fd(wfio_fd_t handle, int *error)
Wrap the device with the given file descriptor handle.
WFIO_DLL void wfio_fd_close(wfio_fd_t fd)
Close a presently open file descriptor.
#define WFIO_INLINE
Mark this symbol for inlining.
Definition: host.h:377
#define WFIO_C_END
Definition: host.h:485
A simple, byte-oriented channel.
Definition: device.h:164
A Device wrapping a file descriptor.
Definition: fd.h:241
WFIO_DLL int wfio_fd_setflags(wfio_fd_t fd, int flags, int *error)
Update the device flags of the file descriptor fd.
int flags
This device's flags.
Definition: device.h:178
WFIO_DLL_FASTCALL size_t wfio_fd_read(wfio_fd_t fd, void *buf, size_t len, int *error)
Read from a file descriptor.
WFIO_DLL wfio_fd_t wfio_fd_open(const char *path, const char *mode, int *error)
Open a new file descriptor for the given path and in the specified STDIO mode mode.
WFIO_DLL int wfio_fd_truncate(wfio_fd_t fd, size_t sz, int *error)
Resize the resource represented by the file descriptor fd to be no greater than sz.
int wfio_openmode_t
The type corresponding to an openmode.
Definition: iotype.h:103