Документ взят из кэша поисковой машины. Адрес оригинального документа : http://jet.sao.ru/hq/sts/linux/book/c_marshall/subsection2_18_3_2.html
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 09:29:05 2012
Кодировка:

Поисковые слова: m 15
File Manipulation Routines



Next: errno Up: File and Directory Manipulation Previous: Directory handling functions

File Manipulation Routines

int access(char *path, int mode) - determine accessibility of file.

path points to a path name naming a file. access() checks the named file for accessibility according to mode, defined in #include <unistd.h>:

R_OK
- test for read permission
W_OK
- test for write permission
X_OK
- test for execute or search permission
F_OK
- test whether the directories leading to the file can be searched and the file exists.

access() returns: 0 on success, -1 on failure and sets errno to indicate the error. See man pages for list of errors.


Dave.Marshall@cm.cf.ac.uk
Wed Sep 14 10:06:31 BST 1994