NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO | STANDARDS | RESTRICTIONS FOR ChorusOS
#include <sys/stat.h>int mkdir(const char *path, mode_t mode);
MSDOSFS, NFS_CLIENT, UFS
The directory path is created with the access permissions specified by mode and restricted by the umask(2POSIX) of the calling process.
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.
If succesful, mkdir returns 0; otherwise a value of -1 is returned, and errno is set to indicate one of the following error conditions.
A component of the path prefix is not a directory.
A component of a pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX characters.
A component of the path prefix does not exist.
Search permission is denied for a component of the path prefix.
Too many symbolic links were encountered in translating the pathname.
The file named resides on a read-only file system.
The file named already exists.
The new directory cannot be created because there is no space left on the file system to contain the directory.
There are no free inodes on the file system on which the directory is being created.
The new directory cannot be created because the user's quota of disk blocks on the file system that will contain the directory has been exhausted.
The user's quota of inodes on the file system on which the directory is being created has been exhausted.
An I/O error occurred while making the directory entry or allocating the inode.
An I/O error occurred while reading from or writing to the file system.
path points outside the process's allocated address space.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
mkdir conforms to IEEE Std 1003.1-1988 POSIX.
The current mask mode defaults to rwxrwxrwx on top of ChorusOS, see security(4CC) for further details.
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO | STANDARDS | RESTRICTIONS FOR ChorusOS