The optional file-system service from runtime
Optionaloptions: { rootDir?: string }
Provider options
Optionalplatform: () => stringConnects, and PROVES the root is writable rather than assuming it.
The probe exists because of X8-9: a scaffolded Deno project's start task
requests --allow-net --allow-env --allow-read --allow-sys and no
--allow-write, so every upload failed while /health reported up —
the M70c liveness probe calls stat, a READ, which the granted
--allow-read satisfies. Three defects had to be understood before the
one-flag cause was visible. Failing here instead, with the flag named,
follows this repo's rule of failing at registration with a name rather than
at the first request with a bare error.
A startup probe rather than a per-check write: writability changes almost never, and a write on every health-probe interval is recurring I/O for a fact that does not move.
Deletes an object from disk.
Object path/key
true if an object was deleted
Disconnect is a no-op for local storage.
Reports whether an object exists on disk.
Object path/key
true if present
Retrieves an object from disk; null when absent.
Object path/key
The object bytes, or null
Refuses — local storage cannot produce signed URLs.
The refusal is a REJECTION, never a synchronous throw: this method is
typed Promise<string>, so a throw escaping before the promise exists is
invisible to a caller using .catch(). Every other IStorage.getSignedUrl
in the repo answers the same way — the S3/GCS/Azure providers reject, and
cloudflare-plugin's R2Storage returns Promise.reject for this exact
cannot-presign reason.
Object path/key
Expiry options
M70c: runtime.fs.stat(root) succeeds — a disk that vanished or a
permission change is a real, common failure.
Also reports false when the root never proved WRITABLE at connect().
A stat-only probe answered up for a root the process could read and not
write, which is exactly the state X8-9 found: uploads failing while health
said everything was fine.
true when the root directory is reachable and writable
Reports readiness (true when fs is present and connected).
Stores an object on disk.
Object attributes are ACCEPTED AND NOT PERSISTED: a file system stores
bytes and has nowhere to record a content type, and this provider's
getSignedUrl throws, so nothing could ever read one back. Documented per
provider in the package README rather than silently dropped.
Object path/key
Object bytes
Optional_options: PutObjectOptions
Accepted for interface parity; see above
Local file-system storage provider.
Paths are contained under
runtime.fsroot —..escape is prevented by joining throughruntime.fs.realPath(when available) or lexical normalization.getSignedUrlthrows with a documented message (conflict C3).Since
0.1.0