INtime SDK Help

Creates a new directory with the specified ownership and access rights.

#include <direct.h>

int mkdir (const char *pathname, mode_t pmode);


Pathname of the directory to create. Name the new directory according to the rules for the real-time OS.
Permission mode: the ownership and access rights as one or more of the manifest constants described in chmod. Join more than one constant with the bitwise-OR operator (|).


mkdir applies the default file-permission mask (set with umask) to pmode before setting the permissions.

By default, this function creates directories that all threads can share. If O_EXCL is ORed with pmode, the file is opened with share-with-none permission, like UNIX.

This function performs a translation of POSIX file ownership rights and POSIX access rights to the real-time OS equivalent as described in chmod.

Return Values

0 (zero).
-l (the function sets errno to EACCES, EEXIST, ENOENT, ENOSPC, or ENOTDIR).


Versions Defined in Include Link to
INtime 3.0 intime/rt/include/direct.h direct.h clib.lib

See Also

chmod, ERRNO.H, Command Reference for directory naming rules