Storage API : Rename
Script path: /storage/bin/api/rename.cgi
Description: Renames a file or folder.
INPUT (via GET or POST)
Mandatory parameters are: sid, path, newname
Optional parameters are: none
sid | session id of the login user. [mandatory] |
path | path to an item [mandatory] Please refer to [How to specify a path]. path must point to an existing file or folder. e.g. |
newname | = <newname> The new name to use. For acceptable names, refer to [Name restriction] |
OUTPUT (content-type: text/plain)
Successful return:
true <newline>
Unsuccessful return:
false <tab> <error message> <newline>
e.g.
false <TAB> New name is invalid. (illegal character, too long, etc.)