CopyFile (copy a file)
ts
function CopyFile(what, toWhere: string): boolean;
This function copies the what
file to the toWhere
destination directory in the local file system, and returns true if the copy is successful, or false if the copy fails.
This function accepts the following parameters:
Parameter | Type | Requirement | Explanation |
---|---|---|---|
what | string | required | must be a valid and existing file in a local file system |
toWhere | string | required | a valid and existing directory in a local file system where you want to copy the file to |
Possible return values:
Value | Explanation |
---|---|
true | the function succeeded: the file was copied to the destination folder |
true | the function failed: the file was not copied |