What You’ll Learn
- Creating directories with
sbx.commands.run("mkdir -p ...") - Writing and executing a file-generating script
- Listing output files with
sbx.files.list() - Reading multiple files with
sbx.files.read()in a loop - Iterating over
EntryInfoobjects (name,type,size,path)
Prerequisites
This example is available in Python. TypeScript version coming soon.
Code Walkthrough
Create an output directory inside the sandbox:entry has name, type, size, and path:
path attribute from the directory listing: