Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete a directory #15

Open
Xkonti opened this issue Aug 27, 2023 · 0 comments
Open

Delete a directory #15

Xkonti opened this issue Aug 27, 2023 · 0 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@Xkonti
Copy link
Owner

Xkonti commented Aug 27, 2023

An endpoint that deletes a specified directory

  • Verb: DELETE
  • Path: /dir

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
@Xkonti Xkonti added the enhancement New feature or request label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant