Xbasic
FILE.DIR_CREATE_RECURSE Function
Syntax
Success_Flag as L = FILE.dir_create_recurse(C folder )
Arguments
- folderCharacter
The name and path of a folder.
Returns
- Success_FlagLogical
Returns .T. if the folder was created, otherwise .F.
Description
Creates a folder, creating as many sub-folders as necessary.
Discussion
The FILE.DIR_CREATE_RECURSE() method creates a folder, creating as many subfolders as necessary. The function returns True (.T.) if it created the folder or if the folder already existed. The function returns False (.F.) if it was unable to create the folder. In the example below, the function was unable to create the "x:\databases" folder, because the "x" drive did not exist.
Example
? FILE.dir_create_recurse("c:\databases") = .T. ' drive "x" doesn't exist: ? FILE.dir_create_recurse("x:\databases") = .F.
See Also