Module fileio

Source
Expand description

Module for /edit entrypoint that handles delete/rename actions.

Structsยง

Payload ๐Ÿ”’
Struct to represent the payload data with the URL locator and path locator and the new name for the file.
edit
Handles requests for the /edit endpoint, to delete/rename media files and directories.

Functionsยง

delete ๐Ÿ”’
Deletes the file.
extract_media_path ๐Ÿ”’
Extracts the path the file/directory that has to be modified from the payload received.
is_valid_name ๐Ÿ”’
Checks if the new filename is valid with multiple conditions.
rename ๐Ÿ”’
Renames the file.