> ## 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.

# Get File Info

> Stat a path in an agent runtime (size, permissions, mtime)

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

```python theme={null}
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

| Parameter | Type   | Required | Description  |
| --------- | ------ | -------- | ------------ |
| `path`    | string | Yes      | Path to stat |

## Response (`FileGetInfoResponse`)

| Field    | Type                 | Description                    |
| -------- | -------------------- | ------------------------------ |
| `exists` | boolean              | Whether the path exists        |
| `info`   | `FileInfo` or `None` | Metadata when `exists` is true |

`FileInfo` includes `name`, `path`, `size`, `is_dir`, `mode` (octal string), `permissions` (e.g. `rw-r--r--`), and `modified_at`.
