Search permission is denied for a directory in a file's path prefix
EEXIST
The name file already exist.
EMLINK
The number of links would exceed LINK_MAX
ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
effect.
ENOENT
A file or directory does not exist.
ENOSPC
No space left on disk.
ENOTDIR
A component of the specified pathname was not a directory when a directory
was expected.
EROFS
Read-only file system.
DESCRIPTION:
The mkdir() function creates a new diectory named path. The
permission bits (modified by the file creation mask) are set from mode.
The owner and group IDs for the directory are set from the effective user ID
and group ID.
The new directory may (or may not) contain entries for.. and .. but is otherwise
empty.