Mkdir()
ts
Mkdir(path: string): respBase;Creates a new directory within the context of the target file-system's hierarchy.
NOTE
Mkdir() will fail and return an error if any of the parent directories does not exist. To create an entire nested directory branch, see MkdirAll().
Parameters
| Parameter | Type | Explanation |
|---|---|---|
path | string | The 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.Mkdir("/data/backup");
if (resp.Ok()) {
Log("Dir /backup was created inside of existing dir /data");
} else {
Log("Error: " + resp.ErrorMsg());
}
} else {
Log("VFS was null");
}