The duplicate function is established to make a copy of a file or folder. If the destination is existed, it will NOT be overwritted.
file.duplicate("myFile.txt","yourFile.txt");
file.duplicate("myFolder","yourFolder");
Calling | Returning |
---|---|
file . duplicate ( srcPath, destPath ) | Boolean |
Parameters | Type | Description |
---|---|---|
srcPath | String | The relative file or folder path to the storage for coping. |
destPath | String | The relative file or folder path to the storage for saving. |