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.

from gravixlayer import GravixLayer

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

listing = runtime.file.list("/workspace")

for item in listing.files:
    kind = "dir" if item.is_dir else "file"
    print(f"{item.name}  {kind}  {item.size} bytes")
    if item.permissions:
        print(f"  {item.permissions}")

runtime.kill()

Parameters

ParameterTypeRequiredDescription
pathstringYesDirectory path

Response

Each entry in listing.files:
FieldTypeDescription
namestringFile or directory name
pathstringFull path when provided by the backend
sizeintegerSize in bytes
is_dirbooleanTrue if directory
modified_atstringLast modified timestamp
modestringOctal permission bits
permissionsstringHuman-readable permissions (e.g. rw-r--r--)