Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gravixlayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Returns metadata for a path (size, mode, human-readable permissions such as rw-r--r--, modification time when available).
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

# Write a file first so we have something to stat
runtime.file.write("/workspace/output.txt", "hello\n")

info = runtime.file.get_info("/workspace/output.txt")
if info.exists and info.info:
    f = info.info
    print(f"Permissions: {f.permissions}")
    print(f"Mode (octal): {f.mode}")
    print(f"Size: {f.size}")

runtime.kill()

Parameters

ParameterTypeRequiredDescription
pathstringYesPath to stat

Response (FileGetInfoResponse)

FieldTypeDescription
existsbooleanWhether the path exists
infoFileInfo or NoneMetadata when exists is true
FileInfo includes name, path, size, is_dir, mode (octal string), permissions (e.g. rw-r--r--), and modified_at.