FileTools
MakeDirectory
make a directory
Calling Sequence
Parameters
Options
Description
Examples
MakeDirectory(path, recurse)
path
-
string; path name of directory to create
recurse
(optional); expression where recurse = true or recurse = false
recurse = truefalse
Specifies whether directories should be created recursively. If recurse=true is specified, then all directories named in path which do not exist will be created. Otherwise, only the last will be created, and an exception will be raised if the preceding directories do not exist. The default value of recurse is false.
The MakeDirectory(path, recurse) command creates a directory in the file system at the filepath path.
The path argument, which must be a Maple string, specifies the path name of the directory to create.
The set of characters that are permitted in directory names is system dependent. Likewise, the character used to separate the components of a directory is system dependent. If the backslash character is to appear in the string, it must be doubled up, because Maple strings use the backslash character as an escape character.
If successful, MakeDirectory will return NULL (that is, nothing). If unsuccessful, an exception will be raised.
FileToolsMakeDirectory⁡/tmp/test
FileToolsMakeDirectory⁡C:\\TEMP\\Test
FileToolsMakeDirectory⁡/tmp/a/b/c/d/e/f,recurse=true
See Also
FileTools[IsDirectory]
FileTools[ListDirectory]
FileTools[ParentDirectory]
mkdir
Download Help Document