Overview
list_files provides instant filesystem inspection without the overhead of starting a container. Use it to explore image contents, verify file existence, and check permissions before running commands.
Parameters
Returns
File Entry Fields
Cost
Free - No VM spawned. Reads directly from image filesystem.Examples
List Root Directory
List Specific Directory
Verify File Existence Before Running
Best Practices
- Prefer over
run("ls")-list_filesis instant and free - Verify paths before commands - Check files exist to avoid errors
- Explore unfamiliar images - Understand structure before running code
- Check permissions - Verify executable bits and ownership