The rmdir function removes a directory file whose name is specified in the path argument. The directory is removed only if it is empty. If path names a symbolic link, then rmdir fails and sets errno to ENOTDIR.