Fileman
Manage Files
Copy a file
This function copies a file or directory to a new location and preserves the source permissions and modification time. If the destination is an existing directory, the source is copied into it. The function returns an error if the destination already exists.
Important:
When you disable the File Storage role, the system disables this function.
get/Fileman/copy_file
Query parameters
destinationstring path required
Example:public_html/backup/file.txt
The path to copy the source to.
sourcestring path required
Example:public_html/file.txt
The path to the file or directory to copy.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "copy_file",
"module": "Fileman",
"result": {
"status": 1
}
}