Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir.bsd(2) — Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(2)

unlink(2)

RMDIR(2)

NAME

rmdir − remove a directory file

USAGE

rmdir(path) char *path;

DESCRIPTION

Rmdir removes the directory file named by path.  The directory must be empty (a directory that only contains the entries “.” and “..” is considered to be empty). 

RETURN VALUE

A successful call returns zero.  A failed call returns -1 and sets errno as indicated below. 

ERRORS

The named file is removed unless one or more of the following are true:

[ENOTEMPTY] The named directory is not empty. 

[EPERM] The pathname contains a character with the high-order bit set. 

[ENOENT] The pathname is too long. 

[ENOTDIR] A component of the path prefix is not a directory. 

[ENOENT] The named file does not exist. 

[EACCES] A component of the path prefix denies search permission. 

[EACCES] Write permission is denied on the directory containing the link to be removed. 

[EBUSY] The directory to be removed is the mount point for a mounted file system. 

[EROFS] The directory entry to be removed resides on a read-only file system. 

[EFAULT] Path points outside the process’s allocated address space. 

[ELOOP] Too many symbolic links were encountered in translating the pathname. 

RELATED INFORMATION

mkdir(2), unlink(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026