SYNOPSIS
#include <unistd.h>
int rmdir(const char *pathname);
DESCRIPTION
The
If the directory's link
count becomes zero and no process has the directory open or
locked, the directory space is freed and the directory is no
longer accessible. If one or more processes have the directory
open or locked (for example, by having the directory as the current
working directory),
PARAMETERS
RETURN VALUES
If successful,
- EACCES
-
Search permission is denied on a component of the pathname prefix.
Write permission is denied on the directory that contains the directory to be removed.
- EBUSY
-
The directory to be removed is currently in use by the system or another process or the directory to be removed is the current directory of some process.
- EEXIST
-
pathname names a directory that is not empty; the directory contains entries other than those for dot (.) and dot-dot (..).
- EFAULT
-
pathname is an invalid pointer.
- ENAMETOOLONG
-
The length of the pathname parameter exceeds PATH_MAX or a pathname component is longer than NAME_MAX.
- ENOENT
-
pathname names a nonexistent directory or points to an empty string.
CONFORMANCE
POSIX.1 (1996), with exceptions.
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
Windows does not let you delete a directory if a user has a lock on it.
Any user that is in that
directory has a lock on it. All locks to a directory must be
resolved before
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.