Posts Tagged ‘open’
dirfd – get directory stream file descriptor
USAGE
#include <sys/types.h>
#include <dirent.h>
int dirfd(DIR *dir);
DESCRIPTION
The function dirfd() returns the file descriptor associated with the
[...]
dup, dup2 – duplicate a file descriptor
USAGE
#include <unistd.h>
int dup(int oldfd);
int dup2(int oldfd, int newfd);
DESCRIPTION
dup() and dup2() create a copy of the file descriptor oldfd.
[...]
clearerr, feof, ferror, fileno – check and reset stream status
USAGE
#include <stdio.h>
void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);
int fileno(FILE *stream);
DESCRIPTION
[...]
open, creat – open and possibly create a file or device
USAGE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int open(const char *pathname, int flags);
int open(const [...]
close – close a file descriptor
USAGE
#include <unistd.h>
int close(int fd);
DESCRIPTION
close() closes a file descriptor, so that it no longer refers to any
file and may be [...]
access – check user’s permissions for a file
USAGE
#include <unistd.h>
int access(const char *pathname, int mode);
DESCRIPTION
access() checks whether the process would be allowed to read, write or
test for [...]
