From 9a0b0089c39004c6a6bb6d27d5778998e206e8fc Mon Sep 17 00:00:00 2001 From: Wade A Smith Date: Fri, 25 Sep 1998 16:20:52 +0000 Subject: Docmumented the access routine in for this file. --- doc/new_chapters/files.t | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'doc/new_chapters') 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: @page -@subsection access - +@subsection access - Check user's permissions for a file @subheading CALLING SEQUENCE: @ifset is-C @example -int access( +#include + +int access(const char *pathname, + int mode ); @end example @end ifset @@ -958,14 +961,36 @@ int access( @subheading STATUS CODES: @table @b -@item E -The +@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. +@item ENAMETOOLONG +@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 @page @subsection chmod - Changes file mode. -- cgit v1.2.3