Files
oldlinux-files/Minix/2.0.0/wwwman/man2/rmdir.2.html
2024-02-19 00:21:39 -05:00

124 lines
2.4 KiB
HTML

<HTML>
<HEAD>
<TITLE>rmdir(2)</TITLE>
</HEAD>
<BODY>
<H1>rmdir(2)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
rmdir - remove a directory file
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>#include</STRONG> <STRONG>&lt;unistd.h&gt;</STRONG>
<STRONG>int</STRONG> <STRONG>rmdir(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>path</EM><STRONG>)</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
<STRONG>Rmdir</STRONG> removes a directory file whose name is given by <EM>path</EM>. The directory
must not have any entries other than "." and "..".
</PRE>
<H2>RETURN VALUE</H2><PRE>
A 0 is returned if the remove succeeds; otherwise a -1 is returned and an
error code is stored in the global location <EM>errno</EM>.
</PRE>
<H2>ERRORS</H2><PRE>
The named file is removed unless one or more of the following are true:
[ENOTDIR] A component of the path is not a directory.
[ENAMETOOLONG] The path name exceeds PATH_MAX characters.
[ENOENT] The named directory does not exist.
[ELOOP] Too many symbolic links were encountered in translating
the pathname. (Minix-vmd)
[ENOTEMPTY] The named directory contains files other than ``.'' and
``..'' in it.
[EACCES] Search permission is denied for a component of the path
prefix.
[EACCES] Write permission is denied on the directory containing the
link to be removed.
[EPERM] The directory containing the directory to be removed is
marked sticky, and neither the containing directory nor
the directory to be removed are owned by the effective
user ID.
[EBUSY] The directory to be removed is the mount point for a
mounted file system.
[EIO] An I/O error occurred while deleting the directory entry
or deallocating the inode.
[EROFS] The directory entry to be removed resides on a read-only
file system.
[EFAULT] <EM>Path</EM> points outside the process's allocated address space.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man2/mkdir.2.html">mkdir(2)</A></STRONG>, <STRONG><A HREF="../man2/unlink.2.html">unlink(2)</A></STRONG>.
</PRE>
</BODY>
</HTML>