Rename / Move a File
litewrite_rename_fileRename or move a file or folder in a Litewrite project by providing a new name or target path.
Instructions
Rename or move a file/folder in a Litewrite project (POST /api/internal/files/rename).
Args:
projectId (string, required): The project id.
sourcePath (string, required): Current relative path.
newName (string, optional): New name (keeps the same parent).
targetPath (string, optional): Full target relative path to move it.
Provide at least one of newName or targetPath.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newName | No | New name within the same folder | |
| projectId | Yes | The Litewrite project id | |
| sourcePath | Yes | Current relative path | |
| targetPath | No | Full target relative path |