gno/usr.man/man2/rmdir.2
1999-07-03 14:46:37 +00:00

38 lines
860 B
Groff

.\"
.\" $Id: rmdir.2,v 1.2 1999/07/03 14:44:15 gdr-ftp Exp $
.\"
.TH RMDIR 2 "17 October 1997" GNO "System Calls"
.SH NAME
rmdir \- remove (delete) a directory
.SH SYNOPSIS
#include <unistd.h>
.sp 1
int \fBrmdir\fR (const char *\fIpath\fR);
.SH DESCRIPTION
.BR rmdir
will remove the directory named by
.I path
if the directory is empty, if it is not a mount point, and if the calling
process has write permission in the parent directory. The directory is
considered empty when it contains only
.B .
and
.B ..
entries.
.SH "RETURN VALUE"
0 if successful, -1 and sets
.B errno
otherwise.
.SH BUGS
Since
.BR rmdir
is not yet implemented as a system call but as a library call, it is
possible to delete a directory which is being used by a process, including
that of
.BR rmdir .
.SH AUTHOR
Devin Reade, <gdr@gno.org>
.SH "SEE ALSO"
.BR mkdir (2),
.BR unlink (2).