|
LIBRARY#include <fcntl.h> #include <xtend/fast-file.h> -lxtend SYNOPSISffile_t *ffdopen(int fd, int flags) ARGUMENTSfd Open file descriptor to which stream is attached flags Bit flags passed to open(3) DESCRIPTIONffdopen() initializes a ffile_t stream, much as fdopen() does for a FILE stream. Unlike fdopen(), ffdopen() takes the same bit mask argument as open() to determine the open mode. See open(3) for details.An optimally sized buffer for the underlying filesystem is allocated, along with additional space for limited ffungetc() operations. The ffile_t system is simpler than and several times as fast as FILE on typical systems. It is intended for processing large files character-by-character, where low-level block I/O is not convenient, but FILE I/O causes a bottleneck. RETURN VALUESA pointer to a ffile_t object on success, NULL on failureEXAMPLESffile_t *stream; char *filename; int fd; fd = open(filename, O_RDONLY); stream = ffdopen(fd, O_RDONLY); SEE ALSOffopen(3), open(3) Visit the GSP FreeBSD Man Page Interface. |