Skip to main content
The files module returns an entry object for a path in the sandbox, whether the path is a file or a directory. The object lists the filename, type and path, along with the size, permissions and owner recorded by the filesystem.
Install the SDK, or the CLI for ppio commands, and set the PPIO_API_KEY and PPIO_DOMAIN environment variables before running these examples. See Quickstart and Install and authenticate.

Get metadata about a file

Create a file, then pass its path to get_info() or getInfo().

Get metadata about a directory

The same call returns metadata for a directory, with type set to dir.

Metadata fields

The entry object has the following fields.
string
Name of the file or directory, without the parent path.
FileType
FileType.FILE (value file) for a file and FileType.DIR (value dir) for a directory.
string
Full path of the entry inside the sandbox.
number
Size in bytes.
number
Numeric mode, such as 420 for a file with -rw-r--r-- permissions.
string
Symbolic permissions, such as -rw-r--r-- for a file or drwxr-xr-x for a directory.
string
Owner of the entry.
string
Group of the entry.
datetime
Last modification time.
Target of the entry when it is a symbolic link, otherwise None.
Last modified on November 19, 2026