CreateDirectory
CreateDirectory creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.
Syntax
BOOL CreateDirectory(
[in] LPCTSTR lpPathName,
[in, optional] LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
Parameters
[in] lpPathName
A pointer to a null-terminated string that specifies the path of the directory to be created.
There is a default string size limit for paths of 260 characters. This limit is related to how CreateDirectory parses paths.
[in, optional] lpSecurityAttributes
Ignored in RTSS. A pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpSecurityAttributes is NULL, the handle cannot be inherited.
The lpSecurityDescriptor member of the structure specifies a security descriptor for the new directory. If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The target file system must support security on files and directories for this parameter to have an effect.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code if the function fails.
Remarks
Some file systems, such as NTFS, support compression for individual files and directories. On volumes formatted for such a file system, a new directory inherits the compression attribute of its parent directory.
Filesystem APIs only support absolute path names. If a relative or simple path name is passed into the function, it will return ERROR_PATH_NOT_FOUND.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
windows.h |
wRTOS_rtss.lib |
See Also: