INtime SDK Help
mkdir

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

#include <direct.h>

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

Parameters

pathname
Pathname of the directory to create. Name the new directory according to the rules for the real-time OS.
pmode
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 (|).

Remarks

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).
Success.
-l (the function sets errno to EACCES, EEXIST, ENOENT, ENOSPC, or ENOTDIR).
Failure.

Requirements

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