v33

latestOpenAPI 3.1.0raw.githubusercontent.com2026-04-175267122.5 KB

Get filesystem path info

Returns information about a path in the guest filesystem. Useful for checking if a path exists, its type, and permissions before performing file operations.

get/instances/{id}/stat

Path parameters

idstring required

Instance ID or name

Query parameters

pathstring required

Path to stat in the guest filesystem

follow_linksboolean

Follow symbolic links (like stat vs lstat)

Response

Path information

existsboolean required

Whether the path exists

is_dirboolean

True if this is a directory

is_fileboolean

True if this is a regular file

is_symlinkboolean

True if this is a symbolic link (only set when follow_links=false)

link_targetstring nullable

Symlink target path (only set when is_symlink=true)

modeinteger

File mode (Unix permissions)

sizeinteger

File size in bytes

errorstring nullable

Error message if stat failed (e.g., permission denied). Only set when exists is false due to an error rather than the path not existing.

Example response

{
  "exists": true,
  "is_file": true,
  "link_target": "/actual/target/path",
  "mode": 420,
  "size": 1024,
  "error": "permission denied"
}