FileOps.$createdir()

Function group Execute on client Platform(s)
FileOps NO All

Syntax

FileOps.$createdir(cPath[,bCreateParentDirs=kFalse])

Description

Creates a directory with the pathname cPath. Pathnames can be over 255 characters, which was the limit in Studio 8.0.1 or earlier.

With the exception of the last directory, all directories specified in the cPath parameter must already be present, unless bCreateParentDirs is kTrue, in which case any parent directories in cPath that do not exist are also created.

If bCreateParentDirs is kTrue and the directory in cPath already exists, FileOps will return 0 (success) rather than 101215 (A file with the specified name already exists). If bCreateParentDirs is kFalse (default), or is omitted, then the usual 101215 is returned if directory in cPath already exists.

The function returns an error code, or zero if successful: see the FileOps function error codes.

Example

Do  FileOps.$createdir('c:\omnis\examples\extcomp\clock') Returns lError
# creates the 'clock' folder assuming c:\omnis\examples\extcomp is a valid path