E2B icon

E2B

Run commands and manage E2B sandboxes and snapshots

File → Get Info

AI-generated

Summary

Retrieve metadata information about a specified file or directory inside an E2B sandbox.

Inputs

  • Sandbox ID (required) — ID of the sandbox to work with.
  • Path (required) — Filesystem path inside the sandbox pointing to the file or directory.
  • Timeout — Timeout for the operation in seconds, defaulting to 300.

Output shape

a single record containing file or directory metadata such as name, type, path, size, permissions, owner, group, modification time, symlink target, and associated sandbox ID.

Returns detailed file info as JSON; throws an error if the file or directory is not found or the operation fails.

Examples

Example 1: Get information on a file in a sandbox

Specify sandboxId and the file path to retrieve metadata about that file.

Links

Discussion