 | | The rmdir function removes the directory named by path. The directory must be empty except for entries for itself (.) and its parent (..). When the directory's link count becomes zero and no process has the directory open, the space used by the directory is freed, and the directory ceases to exist. If one or more processes have the directory open when the last link is removed, . and .. are removed and no new entries can be created in the directory, but the directory is not removed until all references to it are closed. The process must have write permission in the directory's parent directory in order for rmdir to succeed. On success, rmdir returns 0, on failure, it returns -1 and the reason for failure is placed into the external variable errno. | |
|