ISPO SDK
    Preparing search index...

    Variable fsConst

    Markdown
    fs: {
        delete: (path: string) => Promise<void>;
        external: {
            list: (slotId: string, path?: string) => Promise<ExternalFolderEntry[]>;
            readBinary: (
                slotId: string,
                path: string,
            ) => Promise<ExternalReadBinaryResult>;
            readText: (slotId: string, path: string) => Promise<string>;
            writeText: (
                slotId: string,
                path: string,
                content: string,
                expectedSha256: string | null,
            ) => Promise<ExternalWriteTextResult>;
        };
        list: (path?: string | undefined) => Promise<string[]>;
        read: (path: string) => Promise<string>;
        readBinary: (path: string) => Promise<Uint8Array<ArrayBufferLike>>;
        write: (path: string, content: string) => Promise<void>;
        writeBinary: (path: string, content: Uint8Array) => Promise<void>;
    } = ...

    Project-scoped filesystem. Paths are resolved against the host-resolved private project data root. Paths that escape (.. etc.) are rejected with a scope violation: ... error.

    Requires manifest requests.fs === 'self' and the host fs grant.

    Its six private-storage methods are retained only for one-shot legacy importers. Store new structured state in Entities and user-visible artifacts in Files. fs.external remains the current borrowed-folder API.

    Type Declaration

    • delete: (path: string) => Promise<void>

      Retained only for one-shot legacy importers.

    • external: {
          list: (slotId: string, path?: string) => Promise<ExternalFolderEntry[]>;
          readBinary: (
              slotId: string,
              path: string,
          ) => Promise<ExternalReadBinaryResult>;
          readText: (slotId: string, path: string) => Promise<string>;
          writeText: (
              slotId: string,
              path: string,
              content: string,
              expectedSha256: string | null,
          ) => Promise<ExternalWriteTextResult>;
      }
    • list: (path?: string | undefined) => Promise<string[]>

      Retained only for one-shot legacy importers.

    • read: (path: string) => Promise<string>

      Retained only for one-shot legacy importers.

    • readBinary: (path: string) => Promise<Uint8Array<ArrayBufferLike>>

      Retained only for one-shot legacy importers.

    • write: (path: string, content: string) => Promise<void>

      Retained only for one-shot legacy importers.

    • writeBinary: (path: string, content: Uint8Array) => Promise<void>

      Retained only for one-shot legacy importers.