FilesystemService

(-- api-linter: core::0131::synonyms=disabled aip.dev/not-precedent: ReadFile is a custom method on a singleton resource, not a standard Get method. The "read" verb is appropriate for file I/O operations. --) Reads the contents of a file, following symbolic links.

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

get/v1/{name}/filesystem:readFile

Request

Path parameters

namestring required

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

Query parameters

pathstring required

Required. The path to the file to read. All paths are rooted at the sandbox filesystem root. Must start with a forward slash (e.g., "/app.js", "/workspace/data.csv"). If the path is a symbolic link, it will be resolved to the target file.

Response

A successful response.

contentstring byte

Output only. The raw content of the file as bytes. For text files, this will be UTF-8 encoded text. For binary files, this will be raw binary data.

Changes

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