MakeDir (create a directory)
ts
function MakeDir(what: string): boolean;Attempts to create the directory specified by what in the local file system. Returns true if the creation is successful, or false if it fails.
| Parameter | Type | Requirement | Explanation |
|---|---|---|---|
what | string | required | Path to a valid, non-existing directory you wish to create |
| Return value | Explanation |
|---|---|
true | The directory was successfully created |
false | The operation failed; the directory was not created |
Example
ts
var result = MakeDir('/home/user/newfolder');
if (result) {
Log('Directory created successfully.');
} else {
Log('Directory creation failed.');
}