The rmdir() function removes the directory named by the path name pointed to by path. The directory must not have any entries other than "." and "..".
If the directory's link count becomes zero and no process has the directory open, the space occupied by the directory is freed and the directory is no longer accessible. If one or more processes have
the directory open when the last link is removed, the "." and ".." entries, if present, are removed before rmdir() returns
and no new entries may be created in the directory, but the directory is not removed until all references to the directory have been closed.
Upon successful completion rmdir() marks for update the st_ctime and st_mtime fields of the parent directory.
|