format
typescript
File.Delete(path)class: File
description
Deletes the file at the specified path.
parameter
| param_name | type | description |
|---|---|---|
| path | string | The specified path. |
return
| type | description |
|---|---|
void |
code example
javascript
function Test(file_path: string) {
try {
if (File.Exists(file_path)) {
File.Delete(file_path);
if (File.Exists(file_path)) {
Debug.Error("File '", file_path, "' delete failed.");
return;
}
}
} catch (error) {
Debug.Error(error);
}
}