gno/usr.man/man2/rmdir.2
1997-10-30 05:47:18 +00:00

38 lines
861 B
Groff

.\"
.\" $Id: rmdir.2,v 1.1 1997/10/30 05:47:18 gdr 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@myrias.ab.ca>
.SH "SEE ALSO"
.BR mkdir (2),
.BR unlink (2).