MKDIR(2) DOMAIN/IX SYS5 MKDIR(2)
NAME
mkdir - make a directory file
USAGE
mkdir(path, mode)
char *path;
int mode;
DESCRIPTION
Mkdir creates a new directory file with the name path. Mode
sets the new directory's mode. (The protection part of the
mode is modified by the process's mode mask; see umask(2)).
The directory's owner ID is set to the process's effective
user ID. The directory's group ID is set to that of the
parent directory in which it is created.
The low-order 9 bits of mode are modified by the process's
file mode creation mask; all bits set in the process's file
mode creation mask are cleared. See umask(2).
NOTES
The DOMAIN System's single level store architecture requires
that all filesystem objects be readable in order to be writ-
able or executable. Since write-only or execute-only files
would be unusable in DOMAIN/IX, modes that specify 02
(write-only) or 01 (execute-only) are ORed with 0400 to
force read permission. This applies to the owner, group,
and world portions of the mode word. For example, if mode
0631 were specified, the mode applied to the file would
actually be 0675.
RETURN VALUE
A successful call returns zero. A failed call returns -1
and sets errno as indicated below.
ERRORS
Mkdir will fail and no directory will be created if:
[EPERM] The path argument contains a byte with the high-
order bit set.
[ENOTDIR] A component of the path prefix is not a directory.
[ENOENT] A component of the path prefix does not exist.
[EROFS] The named file resides on a read-only file system.
[EEXIST] The named file already exists.
Printed 12/4/86 MKDIR-1
MKDIR(2) DOMAIN/IX SYS5 MKDIR(2)
[EFAULT] Path points outside the process's allocated
address space.
[ELOOP] The call encountered too many symbolic links in
translating the pathname.
[EIO] An I/O error occurred while the call was writing
to the file system.
RELATED INFORMATION
chmod(2), stat(2), umask(2)
MKDIR-2 Printed 12/4/86