Added fchdir().

This commit is contained in:
Joel Sherrill
2000-06-30 12:49:40 +00:00
parent e8fd6336c1
commit e86236b481

View File

@@ -23,6 +23,7 @@ The directives provided by the files and directories manager are:
@item @code{closedir} - Ends directory read operation
@item @code{getdents} - Get directory entries
@item @code{chdir} - Changes the current working directory
@item @code{fchdir} - Changes the current working directory
@item @code{getcwd} - Gets current working directory
@item @code{open} - Opens a file
@item @code{creat} - Create a new file or rewrite an existing one
@@ -399,6 +400,9 @@ int chdir(
@subheading STATUS CODES:
On error, this routine returns -1 and sets @code{errno} to one of
the following:
@table @b
@item EACCES
Search permission is denied for a directory in a file's path prefix.
@@ -429,6 +433,65 @@ changed.
NONE
@c
@c
@c
@page
@subsection fchdir - Changes the current working directory
@findex fchdir
@cindex changes the current working directory
@subheading CALLING SEQUENCE:
@ifset is-C
@example
#include <unistd.h>
int fchdir(
int fd
);
@end example
@end ifset
@ifset is-Ada
@end ifset
@subheading STATUS CODES:
On error, this routine returns -1 and sets @code{errno} to one of
the following:
@table @b
@item EACCES
Search permission is denied for a directory in a file's path prefix.
@item ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
in effect.
@item ENOENT
A file or directory does not exist.
@item ENOTDIR
A component of the specified pathname was not a directory when directory
was expected.
@end table
@subheading DESCRIPTION:
The @code{fchdir()} function causes the directory named by @code{fd} to
become the current working directory; that is, the starting point for
searches of pathnames not beginning with a slash.
If @code{fchdir()} detects an error, the current working directory is not
changed.
@subheading NOTES:
NONE
@c
@c
@c