format
typescript
File.Move(src, dst)class: File
description
Move the source file to the specified path.
parameter
| param_name | type | description |
|---|---|---|
| src | string | The source file path. |
| dst | string | The destination path. |
return
| type | description |
|---|---|
void |
code example
javascript
function Test(src_path: string, dst_path: string) {
File.Move(src_path, dst_path);
try {
if (!File.Exists(dst_path)) {
Debug.Error("File '", src_path, "' has been moved to '", dst_path, "', but dest file does not exist.");
}
if (File.Exists(src_path)) {
Debug.Error("File '", src_path, "' has been moved to '", dst_path, "', but src file still exist.");
}
} catch (error) {
Debug.Error(error);
}
}