Determines whether a file or directory exists and if it can be accessed
#include <unistd.h>
int access (
const char *path,
int mode);
(IN) Specifies the string containing the path that includes the file or directory to be accessed (maximum 255 characters, including the NULL terminator).
(IN) Specifies the access permission mode for the file.
Returns 0 if the file or directory exists and can be accessed with the specified mode. Otherwise, it returns a value of -1. If an error occurs, the errno parameter is set.
access also works on the DOS partition.
access determines if the file or directory specified by the path parameter exists and if it can be accessed with the file permission given by the mode parameter.
When the mode parameter is 0, only the existence of the file is verified. The read and/or write and/or execute permission for the file can be determined when the bits of the mode parameter are a combination of the following:
The result is dependent on the current connection number.
The SetCurrentNameSpace function sets the name space which is used for parsing the path input to this function.
NOTE:For NetWare® versions before 4.x, access works with only the DOS name space for remote servers.