Go to the previous, next section.
int mkdir(const char *path, mode_t mode);
path: [in] points to the path of the new directory.
mode: [in] the access bits of the new directory.
Creates a new directory. The uid of the new directory is the same as the effective uid of the calling task. The gid of the new directory is the same as its parent directory.
On success zero is returned. On error, -1 is returned and errno
is
set to one of the following values:
EINVAL
: the path contains a character not in the ASCII
[0,127] range.
ENOTDIR
, ENAMETOOLONG
, ENOENT
,
EACCESS
, ELOOP
, EPERM
, EROFS
, EEXIST
,
ENOSPC
, EDQUOT
, EIO
and EFAULT
.
Go to the previous, next section.