|
|
1.1 ! root 1: .\" Copyright (c) 1983 The Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" Redistribution and use in source and binary forms are permitted provided ! 5: .\" that: (1) source distributions retain this entire copyright notice and ! 6: .\" comment, and (2) distributions including binaries display the following ! 7: .\" acknowledgement: ``This product includes software developed by the ! 8: .\" University of California, Berkeley and its contributors'' in the ! 9: .\" documentation or other materials provided with the distribution and in ! 10: .\" all advertising materials mentioning features or use of this software. ! 11: .\" Neither the name of the University nor the names of its contributors may ! 12: .\" be used to endorse or promote products derived from this software without ! 13: .\" specific prior written permission. ! 14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 17: .\" ! 18: .\" @(#)rmdir.2 6.5 (Berkeley) 6/23/90 ! 19: .\" ! 20: .TH RMDIR 2 "June 23, 1990" ! 21: .UC 5 ! 22: .SH NAME ! 23: rmdir \- remove a directory file ! 24: .SH SYNOPSIS ! 25: .nf ! 26: .ft B ! 27: rmdir(path) ! 28: char *path; ! 29: .fi ! 30: .ft R ! 31: .SH DESCRIPTION ! 32: .I Rmdir ! 33: removes a directory file ! 34: whose name is given by ! 35: .I path. ! 36: The directory must not have any entries other ! 37: than \*(lq.\*(rq and \*(lq..\*(rq. ! 38: .SH "RETURN VALUE ! 39: A 0 is returned if the remove succeeds; otherwise a \-1 is ! 40: returned and an error code is stored in the global location \fIerrno\fP\|. ! 41: .SH ERRORS ! 42: The named file is removed unless one or more of the ! 43: following are true: ! 44: .TP 15 ! 45: [ENOTDIR] ! 46: A component of the path is not a directory. ! 47: .TP 15 ! 48: [EINVAL] ! 49: The pathname contains a character with the high-order bit set. ! 50: .TP 15 ! 51: [ENAMETOOLONG] ! 52: A component of a pathname exceeded 255 characters, ! 53: or an entire path name exceeded 1023 characters. ! 54: .TP 15 ! 55: [ENOENT] ! 56: The named directory does not exist. ! 57: .TP 15 ! 58: [ELOOP] ! 59: Too many symbolic links were encountered in translating the pathname. ! 60: .TP 15 ! 61: [ENOTEMPTY] ! 62: The named directory contains files other than ``.'' and ``..'' in it. ! 63: .TP 15 ! 64: [EACCES] ! 65: Search permission is denied for a component of the path prefix. ! 66: .TP 15 ! 67: [EACCES] ! 68: Write permission is denied on the directory containing the link ! 69: to be removed. ! 70: .TP 15 ! 71: [EPERM] ! 72: The directory containing the directory to be removed is marked sticky, ! 73: and neither the containing directory nor the directory to be removed ! 74: are owned by the effective user ID. ! 75: .TP 15 ! 76: [EBUSY] ! 77: The directory to be removed is the mount point ! 78: for a mounted file system. ! 79: .TP 15 ! 80: [EIO] ! 81: An I/O error occurred while deleting the directory entry ! 82: or deallocating the inode. ! 83: .TP 15 ! 84: [EROFS] ! 85: The directory entry to be removed resides on a read-only file system. ! 86: .TP 15 ! 87: [EFAULT] ! 88: .I Path ! 89: points outside the process's allocated address space. ! 90: .SH "SEE ALSO" ! 91: mkdir(2), unlink(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.