Fileman
Manage Files
Rename a file
This function changes the name of a file or directory within the same directory. To move a file to a different directory, use the move_file function. 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/rename_file
Query parameters
destinationstring path required
Example:public_html/new.txt
The new path, in the same directory as the source.
sourcestring path required
Example:public_html/old.txt
The path to the file or directory to rename.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "rename_file",
"module": "Fileman",
"result": {
"status": 1
}
}