SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int mkdir(const char *pathname, mode_t mode);
DESCRIPTION
The
The directory's user ID is set to the process' effective user ID. The directory's group ID is set to the group ID of the parent directory or to the effective group ID of the process.
The newly-created directory is an empty directory.
Upon successful completion,
PARAMETERS
- pathname
-
Specifies the name of the new directory. The path name can be absolute or relative. If the specified path name is relative, the directory is created based upon your current working directory.
- mode
-
Is a bitwise-OR field that specifies what permissions the directory has when it is created.
RETURN VALUES
If successful,
- EACCES
-
Search permission is denied on a component of the path name prefix or write permission is denied on the parent directory of the directory to be created.
- EEXIST
-
The named file already exists.
- EFAULT
-
pathname is an invalid pointer.
- EIO
-
While accessing the file system, an I/O error occurred.
- EMLINK
-
The link count of the parent directory exceeds LINK_MAX.
- ENAMETOOLONG
-
The length of the pathname parameter exceeds PATH_MAX or a path name component is longer than NAME_MAX.
- ENOENT
-
A component of the path name prefix does not exist or is a null path name.
- ENOSPC
-
The file system does not contain enough space to hold the contents of the new directory or to extend the parent directory of he new directory.
- ENOTDIR
-
A component of the path name prefix is not a directory.
- EROFS
-
The parent directory of the directory being created resides on a read-only file system.
CONFORMANCE
POSIX.1 (1996)
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
Directory names are treated as multibyte sequences and are converted to UNICODE
before passing to Win32. The conversion is either performed based on the
current thread locale, set using
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.