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