Actions30
File → List
AI-generatedSummary
List files and directories at a specified path inside an E2B sandbox with a configurable directory depth.
Inputs
- Sandbox ID (required) — ID of the sandbox to work with
- Path (required) — Path inside the sandbox to list contents from
- Depth — Directory depth level to list, minimum 1, default is 1
- Timeout — Timeout in seconds for the listing operation, default is 300 seconds
Output shape
a single JSON object containing the sandbox ID, the path listed, the count of files/directories found, and a list of files/directories with their metadata
The "files" array elements include file metadata such as name, type (file or directory), path, size, permissions, and modification time. If the specified depth is invalid (less than 1), it defaults to 1. Errors during listing result in exceptions.