source: trunk/minix/man/man2/rmdir.2@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.9 KB
Line 
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.
4.\"
5.\" @(#)rmdir.2 6.3 (Berkeley) 8/26/85
6.\"
7.TH RMDIR 2 "August 26, 1985"
8.UC 5
9.SH NAME
10rmdir \- remove a directory file
11.SH SYNOPSIS
12.nf
13.ft B
14#include <unistd.h>
15
16int rmdir(const char *\fIpath\fP)
17.fi
18.ft R
19.SH DESCRIPTION
20.B Rmdir
21removes a directory file
22whose name is given by
23.I path.
24The directory must not have any entries other
25than \*(lq.\*(rq and \*(lq..\*(rq.
26.SH "RETURN VALUE
27A 0 is returned if the remove succeeds; otherwise a \-1 is
28returned and an error code is stored in the global location \fIerrno\fP\|.
29.SH ERRORS
30The named file is removed unless one or more of the
31following are true:
32.TP 15
33[ENOTDIR]
34A component of the path is not a directory.
35.TP 15
36[ENAMETOOLONG]
37The path name exceeds PATH_MAX characters.
38.TP 15
39[ENOENT]
40The named directory does not exist.
41.TP 15
42[ELOOP]
43Too many symbolic links were encountered in translating the pathname.
44(Minix-vmd)
45.TP 15
46[ENOTEMPTY]
47The named directory contains files other than ``.'' and ``..'' in it.
48.TP 15
49[EACCES]
50Search permission is denied for a component of the path prefix.
51.TP 15
52[EACCES]
53Write permission is denied on the directory containing the link
54to be removed.
55.TP 15
56[EPERM]
57The directory containing the directory to be removed is marked sticky,
58and neither the containing directory nor the directory to be removed
59are owned by the effective user ID.
60.TP 15
61[EBUSY]
62The directory to be removed is the mount point
63for a mounted file system.
64.TP 15
65[EIO]
66An I/O error occurred while deleting the directory entry
67or deallocating the inode.
68.TP 15
69[EROFS]
70The directory entry to be removed resides on a read-only file system.
71.TP 15
72[EFAULT]
73.I Path
74points outside the process's allocated address space.
75.SH "SEE ALSO"
76.BR mkdir (2),
77.BR unlink (2).
Note: See TracBrowser for help on using the repository browser.