Skip to content

Rename a directory #16

@Xkonti

Description

@Xkonti

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions