Skip to content

Rename a file #24

Description

@Xkonti

An endpoint that renames a specified file.

  • Verb: POST
  • Path: /file/rename

Query parameters:

Name Value Default value Description
path string required A path to a file which should be renamed.
name string required A new name of the file.

Responses:

  • 204 No Content - when the file was successfully renamed.
  • 404 Not Found - when couldn't find the file or if the path is pointing to a directory.
  • 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 file name - it shouldn't be a path (no /). The new path of the file should be also verified with isPathValid to make sure the outcome will be what user expects.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions