SysCreateDir

From WhitixDoc

Jump to: navigation, search

SysCreateDir creates a directory with the specified name in the filesystem.

Contents

Syntax

int SysCreateDir(
    const char* dirName,
    int permissions
)

Parameters

  • dirName. The name of the directory that will be created. The length of the string is limited to PATH_MAX (typically 2048) bytes by the kernel.
  • permissions. Currently unused. Will be used in the future for filesystem permissions, but is currently ignored by the kernel.

Returns

Returns an integer of 0 if the directory was created successfully.

If the filesystem object cannot be opened, one of the standard error codes will be returned.

Example

This example creates a new directory at the root of the filesystem:

int ret=SysCreateDir("/Custom", 0);
if (ret < 0)
{
    /* Failure */
}


Personal tools