Revision 2914ad38ce40d64d6d2e0254182dcd364db6a005 authored by Bill Joy on 09 May 1979, 07:13:28 UTC, committed by Bill Joy on 09 May 1979, 07:13:28 UTC
Work on file src/printenv.c

Synthesized-from: 2bsd
1 parent fd888be
Raw File
access.2
.th ACCESS II 10/1/78
.sh NAME
access \*- test file access permission
.sh SYNOPSIS
(access = 33.; not in assembler)
.br
.ft B
sys access; name; mode
.s3
access(name, mode)
.br
char *name;
.ft R
.sh DESCRIPTION
.it Name
points to a null-terminated string naming
a file;
.it mode
is an integer less than or equal to 7.
.it Access
tests to see if the real user id of the current
process has the specified access permissions on
the named file.
.s3
The desired access permissions for
.it mode
are constructed by adding 4 for read access, 2 for write
access, and 1 for execute access.
.sh "SEE ALSO"
chmod (II)
.sh DIAGNOSTICS
Error bit (c-bit)
is set if the file cannot be found or the permission is not granted.
From C, a \*-1 return indicates an error.
back to top