rmdir.2

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 89 行

2
89
字号
.\" SCCSID: @(#)rmdir.2	8.1	9/11/90.TH rmdir 2.SH Namermdir \- remove a directory file.SH Syntax.nf.B rmdir(path).B char *path;.fi.SH Description.NXR "rmdir system call".NXR "directory" "removing"The.PN rmdirsystem callremoves a directory filewhose name is given by.I path.The directory must not have any entries otherthan dot (.) and dot-dot (..)..PPIf one or more processes have the directory open when the lastlink is removed, the dot and dot-dot entries, if present, areremoved before .PN rmdir() returns and no new entries may be createdin the directory.  The directory, however, is not removed untilall references to the directory have been closed..SH Return ValuesA zero (0) is returned if the remove succeeds; otherwise, a \-1 isreturned, and an error code is stored in the global location \fIerrno\fP\|..SH DiagnosticsThe named file is removed unless one or more of thefollowing are true:.TP 15[ENOTEMPTY]The named directory contains files other than dot and dot-dot. .TP 15[EPERM]The directory containing the directory to be removed is markedsticky, and neither the containing directory nor the directoryto be removed are owned by the effective user ID..TP 15[ENOTDIR]A component of the path is not a directory..TP 15[ENOENT]The named directory does not exist or.I pathpoints to an empty string and the environment defined is POSIX or SYSTEM_FIVE..TP 15[EACCES]Search permission is denied for a component of the.I pathprefix..TP 15[EACCES]Write permission is denied on the directory containing the linkto be removed..TP 15[EBUSY]The directory to be removed is the mount point for a mounted file system..TP 15[EROFS]The directory entry to be removed resides on a read-only file system..TP 15[EFAULT]The.I pathpoints outside the process's allocated address space..TP 15[ELOOP]Too many symbolic links were encountered in translating the pathname..TP 15[ENAMETOOLONG]A component of a pathname exceeded 255 characters, or an entirepathname exceeded 1023 characters..TP 15[EIO]An I/O error occurred while deleting the directory entry ordeallocating the inode..TP[ETIMEDOUT]A connect request or remote file operation failed because the connected partydid not properly respond after a period of time that is dependenton the communications protocol..SH See Alsomkdir(2), unlink(2)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?