diff options
author | David Malone <dwmalone@FreeBSD.org> | 2000-08-28 15:45:42 +0000 |
---|---|---|
committer | David Malone <dwmalone@FreeBSD.org> | 2000-08-28 15:45:42 +0000 |
commit | ad8c1e6a094435bd3e1fe1167df68c58d86c749b (patch) | |
tree | 54e8d522ce3965e1863f1c1be5fde90945f02583 /lib/libc/stdio/remove.3 | |
parent | 05efdfbfab879472a5c12aa47663c4b4a1b50390 (diff) | |
download | src-ad8c1e6a094435bd3e1fe1167df68c58d86c749b.tar.gz src-ad8c1e6a094435bd3e1fe1167df68c58d86c749b.zip |
According to the susv2 man pages I have, remove(3) should act as
rmdir(2) on directories and unlink(2) otherwise. This modification,
and most of the man page update has been obtined from OpenBSD. This
was spotted by someone on a mailing lists a few months ago, but
I've lost their mail.
Reviewed by: sheldonh
Notes
Notes:
svn path=/head/; revision=65164
Diffstat (limited to 'lib/libc/stdio/remove.3')
-rw-r--r-- | lib/libc/stdio/remove.3 | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/lib/libc/stdio/remove.3 b/lib/libc/stdio/remove.3 index 4f2c5c4789d9..0ba144a0aed2 100644 --- a/lib/libc/stdio/remove.3 +++ b/lib/libc/stdio/remove.3 @@ -51,12 +51,17 @@ .Sh DESCRIPTION The .Fn remove -function -is an alias for the -.Xr unlink 2 -system call. -It deletes the file referenced by +function removes the file or directory specified by .Fa path . +.Pp +If +.Fa path +specifies a directory, +.Fn remove "path" +is the equivalent of +.Fn rmdir "path" . +Otherwise, it is the equivalent of +.Fn unlink "path" . .Sh RETURN VALUES Upon successful completion, .Fn remove @@ -70,12 +75,18 @@ The function may fail and set .Va errno -for any of the errors specified for the routine +for any of the errors specified for the routines +.Xr lstat 2 , +.Xr rmdir 2 +or .Xr unlink 2 . .Sh SEE ALSO +.Xr rmdir 2 , .Xr unlink 2 .Sh STANDARDS The .Fn remove function conforms to -.St -ansiC . +.St -ansiC +and +.St -xpg4.2 . |