An endpoint that renames a specified directory.
- Verb:
POST
- Path:
/dir/rename
Query parameters:
| Name |
Value |
Default value |
Description |
path |
string |
required |
A path to a directory which should be renamed. |
name |
string |
required |
A new name of the directory. |
Responses:
204 No Content - when the directory was successfully renamed.
404 Not Found - when couldn't find the directory or if the path is pointing to a file.
409 Conflict - when the new name is already taken by other file or directory.
400 Bad Request - when the path is invalid or when the new name is invalid.
Extra info
The name should be verified to be only a directory name - it shouldn't be a path (no /). The new path of the directory should be also verified with isPathValid to make sure the outcome will be what user expects.
This endpoint doesn't allow for any kind of merging.
An endpoint that renames a specified directory.
POST/dir/renameQuery parameters:
pathnameResponses:
204 No Content- when the directory was successfully renamed.404 Not Found- when couldn't find the directory or if the path is pointing to a file.409 Conflict- when the new name is already taken by other file or directory.400 Bad Request- when the path is invalid or when the new name is invalid.Extra info
The
nameshould be verified to be only a directory name - it shouldn't be a path (no/). The new path of the directory should be also verified withisPathValidto make sure the outcome will be what user expects.This endpoint doesn't allow for any kind of merging.