Skip to main content

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 EntryInfo objects (name, type, size, path)

Prerequisites

This example is available in Python. TypeScript version coming soon.

Code Walkthrough

Create an output directory inside the sandbox:
Write and run a generator script that produces a JSON report and a CSV:
List the output directory — each entry has name, type, size, and path:
Read each file back using the path attribute from the directory listing:

Expected Output