An endpoint that deletes a specified directory
Query parameters:
| Name |
Value |
Default value |
Description |
path |
string |
required |
A path to a directory which should be deleted. |
force |
true or false |
false |
Whether all contents should be forced to be automatically deleted. |
Responses:
204 No Content - when the directory was successfully deleted.
404 Not Found - when couldn't find the directory or if the path is pointing to a file.
400 Bad Request - when the path is invalid.
409 Conflict - when the directory has contents but force is set to false
Extra info
- When the
force is set to false the directory should be deleted only when it's empty - if not empty, respond with 409
- When the
force is set to true the directory and all it's contents (files, subdirectories and their contents, etc) - equivalent of rm -rf
An endpoint that deletes a specified directory
DELETE/dirQuery parameters:
pathforcetrueorfalsefalseResponses:
204 No Content- when the directory was successfully deleted.404 Not Found- when couldn't find the directory or if the path is pointing to a file.400 Bad Request- when the path is invalid.409 Conflict- when the directory has contents butforceis set tofalseExtra info
forceis set tofalsethe directory should be deleted only when it's empty - if not empty, respond with409forceis set totruethe directory and all it's contents (files, subdirectories and their contents, etc) - equivalent ofrm -rf