File Operations

The full sandbox file operations API — read, write, move, search, and transfer.

file-ops

Demonstrates the full sandbox file operations API — no exec/sed needed for common file tasks.

Setup

bunx alineo-cli init   # starts OpenSandbox in Docker (one-time setup)

Run

bun install
bun start

What it covers

MethodDescription
writeFile / readFileWrite and read UTF-8 files
moveFile / deleteFileMove or remove a file
createDirectory / deleteDirectoryCreate or remove directories
listDirectoryList directory contents
searchFilesFind files matching a glob pattern
getFileInfoStat a file (size, type, mode, timestamps)
replaceInFilesIn-place string substitution across one or more files
transferCopy a file from one sandbox to another

Two sandboxes are used to demonstrate transfer().