Remove()
ts
Remove(filePath: string): respBase;Deletes (removes) a file from the target file-system.
IMPORTANT
Remove() can only delete files, not directories. To delete a directory use the Rmdir() method.
Parameters
| Parameter | Type | Explanation |
|---|---|---|
filePath | string | The fully qualified root-based path to the file you wish to delete |
Returns a respBase object.
Example
ts
var vfs = GetCurrentVFS();
if (vfs != null) {
var resp = vfs.Remove("/data/oldstuff.zip");
if (resp.Ok()) {
Log("File deleted");
} else {
Log("Error: " + resp.ErrorMsg());
}
} else {
Log("VFS was null");
}