Skip to main content

What You’ll Learn

  • Writing a file with sbx.files.write()
  • Reading a file with sbx.files.read()
  • Checking file existence with sbx.files.exists()
  • Getting file metadata with sbx.files.get_info() / sbx.files.getInfo()
  • Listing directory contents with sbx.files.list()
  • Creating directories with sbx.files.make_dir() / sbx.files.makeDir()
  • Renaming files with sbx.files.rename()
  • Batch writing with sbx.files.write_files() / sbx.files.writeFiles()
  • Removing files with sbx.files.remove()

Prerequisites

Code Walkthrough

Import WriteEntry for batch operations:
Write and read a file:
Check existence and get metadata:
List directory:
Make a directory, rename a file:
Batch write multiple files at once:
Remove a file and verify:

Expected Output