The resolved sandbox ZenFS, or null when unavailable. The ONE home for the
resolution order previously duplicated in every app's mountFs.ts:
globalThis.__sandpackSharedFs — the /-rooted bound ZenFS the sandbox publishes.
fallback: the first module.evaluation.module.bundler.fs.layers[].boundContext.fs
whose surface has readFile (the bundler ZenFS-layer bound context).
else null (plain local vite dev / before boot).
Under vite dev WITH the @immediately-run/dev-fs plugin (>= 0.5.0), step 1
resolves: the plugin publishes its local-disk fs bridge at the same
__sandpackSharedFs global, so openFs / readBlob / readObjectUrl /
useObjectUrl work locally through this existing path with no special-casing.
Without the plugin they fail with unavailable.
Prefer openFs; reach for this only when a system app spans mounts in absolute
/mnt/{hash} paths (the file explorer / editor).
The resolved sandbox ZenFS, or
nullwhen unavailable. The ONE home for the resolution order previously duplicated in every app'smountFs.ts:globalThis.__sandpackSharedFs— the/-rooted bound ZenFS the sandbox publishes.module.evaluation.module.bundler.fs.layers[].boundContext.fswhose surface hasreadFile(the bundler ZenFS-layer bound context).null(plain localvite dev/ before boot).Under
vite devWITH the@immediately-run/dev-fsplugin (>= 0.5.0), step 1 resolves: the plugin publishes its local-disk fs bridge at the same__sandpackSharedFsglobal, soopenFs/readBlob/readObjectUrl/useObjectUrlwork locally through this existing path with no special-casing. Without the plugin they fail withunavailable.Prefer openFs; reach for this only when a system app spans mounts in absolute
/mnt/{hash}paths (the file explorer / editor).