path: root/doc/new_chapters
diff options
authorWade A Smith <>1998-09-25 16:20:52 +0000
committerWade A Smith <>1998-09-25 16:20:52 +0000
commit9a0b0089c39004c6a6bb6d27d5778998e206e8fc (patch)
tree215f0215ceeea626aa4915573747e31d45f2d604 /doc/new_chapters
parent165988d73574f91b20bd2abfdf41e99acd553e21 (diff)
Docmumented the access routine in for this file.
Diffstat (limited to 'doc/new_chapters')
1 files changed, 31 insertions, 6 deletions
diff --git a/doc/new_chapters/files.t b/doc/new_chapters/files.t
index 819f6f185b..8e4b598921 100644
--- a/doc/new_chapters/files.t
+++ b/doc/new_chapters/files.t
@@ -35,7 +35,7 @@ The directives provided by the files and directories manager are:
@item @code{rename} - Renames a file
@item @code{stat} - Gets information about a file.
@item @code{fstat} -
-@item @code{access} -
+@item @code{access} - Check user's permissions for a file.
@item @code{chmod} - Changes file mode
@item @code{fchmod} -
@item @code{chown} - Changes the owner and/ or group of a file
@@ -941,13 +941,16 @@ The
@subheading NOTES:
-@subsection access -
+@subsection access - Check user's permissions for a file
@ifset is-C
-int access(
+#include <unistd.h>
+int access(const char *pathname,
+ int mode
@end example
@end ifset
@@ -958,14 +961,36 @@ int access(
@subheading STATUS CODES:
@table @b
-@item E
+@item EACCES
+The requested access would be denied, either to the file itself or
+one of the directories in @code{pathname}.
+@item EFAULT
+@code{Pathname} points outside your accessible address space.
+@item EINVAL
+@code{Mode} was incorrectly specified.
+@code{Pathname} is too long.
+@item ENOENT
+A directory component in @code{pathname} would have been accessible but
+does not exist or was a dangling symbolic link.
+@item ENOTDIR
+A component used as a directory in @code{pathname} is not, in fact,
+a directory.
+@item ENOMEM
+Insufficient kernel memory was available.
@end table
@subheading DESCRIPTION:
-@subheading NOTES:
+@code{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
+@code{pathname}. If @code{pathname} is a symbolic link permissions of the
+file referred by this symbolic link are tested.
+@code{Mode} is a mask consisting of one or more of R_OK, W_OK, X_OK and F_OK.
+@subheading NOTES: None
@subsection chmod - Changes file mode.