Description
This function moves or copies a file to a different directory.
Warning:
- UAPI (recommended) — None.
- cPanel API 2 —
Fileman::fileop
— This function performs an operation on one or more files.
Examples
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
opdir |
string |
The file's directory. This parameter defaults to the cPanel account's /home directory. |
Any valid directory, relative to the account's /home directory. |
public_html |
opfile |
string |
Required The file to move or copy. |
Any valid filename. |
myfile.txt |
dir |
string |
Required The file's new location. |
Any valid directory. |
user2 |
fileop |
string |
Required The operation to perform. |
|
move |
Returns
This function does not return output.