Skip to content

Function: scratchFS()

scratchFS(prefix, options?): LocalFileSystem

tmpFS under a root that is unique per call (<prefix>-<id>), for a scratch area no other process or run can collide with.

Prefer this over minting the id at the call site - it is the one place that decides what a throwaway working directory looks like.

string

OsFileSystemOptions = {}

LocalFileSystem

const scratch = scratchFS("remote-skills");
await scratch.writeFile("SKILL.md", body);