Setu-TS
    Preparing search index...

    Class LocalStorageProvider

    Local file-system storage provider.

    Paths are contained under runtime.fs root — .. escape is prevented by joining through runtime.fs.realPath (when available) or lexical normalization.

    getSignedUrl throws with a documented message (conflict C3).

    0.1.0

    Implements

    • StorageProvider
    Index
    • Connects, 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.

      Returns Promise<void>

      If the file system is not available, or the root cannot be created or written to

    • Retrieves an object from disk; null when absent.

      Parameters

      • path: string

        Object path/key

      Returns Promise<Uint8Array<ArrayBufferLike> | null>

      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.

      Parameters

      • _path: string

        Object path/key

      • _options: { expiresIn: number }

        Expiry options

      Returns Promise<string>

      Always, as a rejection — signed URLs unsupported on LocalStorageProvider

    • 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.

      Returns Promise<boolean>

      true when the root directory is reachable and writable

      0.1.0

    • 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.

      Parameters

      • path: string

        Object path/key

      • data: Uint8Array

        Object bytes

      • Optional_options: PutObjectOptions

        Accepted for interface parity; see above

      Returns Promise<void>