Skip to content

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.

ParameterTypeRequirementExplanation
whatstringrequiredPath to a valid, non-existing directory you wish to create
Return valueExplanation
trueThe directory was successfully created
falseThe 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.');
}