RTEMS Logo

RTEMS 4.9.2 On-Line Library


Files and Directories Manager access - Check permissions for a file

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.24: access - Check permissions for a file

CALLING SEQUENCE:

#include <unistd.h>

int access(
  const char *pathname,
  int         mode
);

STATUS CODES:

EACCES
The requested access would be denied, either to the file itself or one of the directories in pathname.
EFAULT
pathname points outside your accessible address space.
EINVAL
Mode was incorrectly specified.
ENAMETOOLONG
pathname is too long.
ENOENT
A directory component in pathname would have been accessible but does not exist or was a dangling symbolic link.
ENOTDIR
A component used as a directory in pathname is not, in fact, a directory.
ENOMEM
Insufficient kernel memory was available.

DESCRIPTION:

Access checks whether the process would be allowed to read, write or test for existence of the file (or other file system object) whose name is pathname. If pathname is a symbolic link permissions of the file referred by this symbolic link are tested.

Mode is a mask consisting of one or more of R_OK, W_OK, X_OK and F_OK.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2008 OAR Corporation