int rmdir(const char *pathname);
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
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.
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.
pathname names a directory that is not empty; the directory contains entries other than those for dot (.) and dot-dot (..).
pathname is an invalid pointer.
The length of the pathname parameter exceeds PATH_MAX or a pathname component is longer than NAME_MAX.
pathname names a nonexistent directory or points to an empty string.
POSIX.1 (1996), with exceptions.
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
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
PTC MKS Toolkit 10.3 Documentation Build 39.