remove a directory
cc ... -lc
int rmdir (path)
removes the directory named by the
pointed to by
The directory must not have any entries other
than ``.'' and ``..''.
A directory is not removed when all of
the following conditions are true:
the parent directory has the sticky bit set
the parent directory is not owned by the user
the directory is not owned by the user
the directory is not writable by the user
the user is not super user
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and
is set to indicate the error.
The rmdir function will fail if:
Search permission is denied for a component of the
Write permission is denied on the directory containing the directory
to be removed.
The directory to be removed is the mount point for a mounted filesystem.
The directory contains entries other than those for ``.''
points outside the process's allocated address space.
The current directory may not be removed.
The ``.'' entry of a directory may not be removed.
An I/O error occurred while accessing the
Components of path require hopping to
multiple remote machines.
The named directory does not exist.
path points to a remote machine, and the link
to that machine is no longer active.
A component of the path prefix is not a directory.
The directory entry to be removed is part of a
rmdir is conformant with:
X/Open Portability Guide, Issue 3, 1989
IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1)
NIST FIPS 151-1
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003