Rename / Move File
Filesystem API
Rename / Move File
Rename or move a file or directory inside a sandbox.
PATCH
Rename / Move File
Renames or moves a file or directory from
old_path to new_path inside the
sandbox. Works for both files and directories. If new_path is in a different
directory, this is equivalent to a move.
Path Parameters
The sandbox identifier. Format:
sbx-<8 chars>.Request Body
Current absolute path of the file or directory.Example:
"/home/user/draft.py"New absolute path (destination). Parent directories must already exist.Example:
"/home/user/final.py"Unix user performing the rename. Defaults to the envd default user.
Response
Returns the envd rename confirmation as a JSON object.Example
Error Responses
| Status | Cause |
|---|---|
400 | Invalid request body |
401 | Missing or invalid API key |
404 | Sandbox not found |
502 | envd daemon unreachable |
503 | Sandbox has no VM |