| www.delorie.com/djgpp/doc/libc-2.01/libc_34.html | search |
#include <unistd.h> int access(const char *filename, int flags);
This function determines what kind of access modes a given file allows.
The parameter flags is the logical or of one or more of the
following flags:
R_OK
W_OK
X_OK
F_OK
D_OK
Zero if the requested access mode is allowed, nonzero if not.
if (access("file.ext", W_OK))
return ERROR_CANNOT_WRITE;
open("file.ext", O_RDWR);
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |