rmdir(3)
NAME
rmdir − remove a directory file
SYNTAX
int rmdir(path)
char *path;
DESCRIPTION
The rmdir subroutine removes a directory file whose name is given by path. The directory must not have any entries other than “.” and “..”.
RETURN VALUE
Returns a 0 if the remove succeeds. Otherwise, returns a −1, indicating that the directory could not be removed. The rmdir subroutine will fail if:
[EACCES] Permission to remove the directory was denied.
[ENOEXEC] Could not exec /bin/rmdir.