Skip to content

Delete a directory #15

@Xkonti

Description

@Xkonti

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions