mkdir()

Creates a directory with a specified name.

Synopsis

bool mkdir( string dir, [ string mode]);

Parameters

Parameter Description
dir The directory (including the path) that should be created. You can specify an absolute path or a relative path from the PROJ_PATH directory.
mode

Mode (optional) how the directory should be created. There are two different modes:

"777" => everyone has write rights to the directory. On Windows the rights are not inherited.

"755" => the directory is created with the default rights. On Windows inherited rights are adopted (normally, this means write rights for the person who created or who owns the directory. All other users only have read rights).

If the specified mode is not "777", the mode is ignored and the default value "755" will be used.

Return value

If the directory has been created, the function returns 1 otherwise, 0.

Error

Missing or wrong parameter definitions.

Description

The function creates a directory with a specified name and mode.

Example

main()
{
  bool res;
  res= mkdir("c://test3//","777");
  DebugN(res);
}

Assignment

File functions

Availability

CTRL