FilesystemService

(-- api-linter: core::0136::verb-noun=disabled aip.dev/not-precedent: Move is a custom method on a singleton resource. The "move" verb follows Unix convention (mv) and clearly conveys imperative action for filesystem operations. --) Moves or renames a file, directory, or symbolic link. By default, fails if the destination already exists. If the source is a symbolic link, the link itself is moved, not its target. If the destination exists and is a symbolic link, it will be replaced.

Authorization: Only the creator of the parent SandboxEngine is allowed to call this method.

post/v1/{name}/filesystem:move

Request

Path parameters

namestring required

Required. The name of the sandbox engine. Format: workspaces/{workspace}/sandboxEngines/{sandbox_engine}

Request body

sourcePathstring required

Required. The path of the source. All paths are rooted at the sandbox filesystem root. Must start with a forward slash (e.g., "/old.js", "/workspace/old.js"). If the source is a symbolic link, the link itself is moved, not its target.

destinationPathstring required

Required. The path of the destination. All paths are rooted at the sandbox filesystem root. Must start with a forward slash (e.g., "/new.js", "/workspace/new.js"). If the destination is a symbolic link, it will be replaced.

overwriteboolean nullable

Optional. If true, overwrites the destination if it already exists. If explicitly set to false or unspecified, the operation will fail if the destination exists.

createParentDirectoriesboolean

Optional. If true, creates parent directories of the destination path if they don't exist. If false or unspecified, the operation will fail if parent directories don't exist.

Response

A successful response.

Changes

No recorded changes to this operation across all 1 revision of this API.