Skip to content

MkdirAll()

ts
MkdirAll(path: string): respBase;

Creates a new directory and, if necessary, all of its parent directories within the context of the target file-system's hierarchy.

Parameters

ParameterTypeExplanation
pathstringThe fully qualified root-based path to the directory you wish to create

Returns a respBase object.

Example

ts
var vfs = GetCurrentVFS();
if (vfs != null) {
    var resp = vfs.MkdirAll("/data/backup");
    if (resp.Ok()) {
        Log("Directory branch /data/backup was created");
    } else {
        Log("Error: " + resp.ErrorMsg());
    }
} else {
    Log("VFS was null");
}