1 .\" Copyright (c) 1983 Regents of the University of California.
2 .\" All rights reserved. The Berkeley software License Agreement
3 .\" specifies the terms and conditions for redistribution.
5 .\" @(#)rmdir.2 6.3 (Berkeley) 8/26/85
7 .TH RMDIR 2 "August 26, 1985"
10 rmdir \- remove a directory file
16 int rmdir(const char *\fIpath\fP)
21 removes a directory file
22 whose name is given by
24 The directory must not have any entries other
25 than \*(lq.\*(rq and \*(lq..\*(rq.
27 A 0 is returned if the remove succeeds; otherwise a \-1 is
28 returned and an error code is stored in the global location \fIerrno\fP\|.
30 The named file is removed unless one or more of the
34 A component of the path is not a directory.
37 The path name exceeds PATH_MAX characters.
40 The named directory does not exist.
43 Too many symbolic links were encountered in translating the pathname.
47 The named directory contains files other than ``.'' and ``..'' in it.
50 Search permission is denied for a component of the path prefix.
53 Write permission is denied on the directory containing the link
57 The directory containing the directory to be removed is marked sticky,
58 and neither the containing directory nor the directory to be removed
59 are owned by the effective user ID.
62 The directory to be removed is the mount point
63 for a mounted file system.
66 An I/O error occurred while deleting the directory entry
67 or deallocating the inode.
70 The directory entry to be removed resides on a read-only file system.
74 points outside the process's allocated address space.