RMDIR(2)

NAME
rmdir - remove (delete) a directory

SYNOPSIS
int rmdir (const char *path);

DESCRIPTION
rmdir will remove the directory named by path if the directory is empty, if it is not a mount point, and if the calling process has write permission in the parent directory. The directory is considered empty when it contains only . and .. entries.

RETURN VALUE
0 if successful, -1 and sets errno otherwise.

BUGS
Since rmdir is not yet implemented as a system call but as a library call, it is possible to delete a directory which is being used by a process, including that of rmdir.

AUTHOR
Devin Reade, <gdr@myrias.ab.ca>

SEE ALSO
mkdir(2), unlink(2).