Function: Create_Directory

Create a directory if it does not exist. This function also creates intermediate directories if necessary.

Prototype:


string result = create_directory ( string path);

Parameters:

Parameter name Type Description
Path string path to the target directory

Return value: Type string : Returns "OK" if the directory exists or is created. Otherwise, an error message.

Example:


string res = create_directory("/Users/ole/Desktop/loggfiles/a/b/c/d/e/f"); 

Suppose "loggfiles" does not exist from before then the following happens.

Otherwise, if some of the directories in this path do not exist, they are created as needed.

See also: