Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(2)

unlink(2)

rmdir(2)

NAME

rmdir − remove a directory

SYNOPSIS

int rmdir (path)
char ∗path;

DESCRIPTION

rmdir removes a directory named by the path name pointed to by path.  The directory must not have any entries other than “.” and “..”. 

RETURN VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, a value of -1 is returned and errno is set to indicate the error.

ERRORS

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

­[EACCES] Search permission is denied for a component of the path prefix, or write permission is denied on the directory containing the directory to be removed. 

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

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

­[EEXIST] The named directory contains entries other than those for "." and "..". 

­[EINVAL] Neither the current directory nor the "." entry of a directory may be removed. 

­[ENAMETOOLONG] The path argument exceeds {PATH_MAX} in length, or a pathname component is longer than {NAME_MAX}  (see pathconf(2)). 

­[ENOENT] The named directory does not exist, or the path argument points to an empty string. 

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

­[EROFS] The directory entry to be removed is part of a read-only file system. 

SEE ALSO

mkdir(2), unlink(2)

CX/UX Programmer’s Reference Manual

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