@flowscripter/pluggable-io-framework-api
    Preparing search index...

    Interface IOProvider<K>

    A configured source/sink instance, as returned by IOProviderFactory.createProvider. K is the single PayloadKind this provider natively produces/consumes - e.g. a pure-TS filesystem plugin is IOProvider<"js">, a Rust-FFI-backed plugin is IOProvider<"native">.

    Every path argument is the provider-specific entry or container key (as produced by IOProviderFactory.toProviderInputs). Each method implies whether it addresses an entry or a container.

    Disposal is Symbol.asyncDispose (TC39 explicit resource management) - host code disposes deterministically via await using provider = ..., including on thrown errors, without needing a bespoke method name.

    interface IOProvider<K extends PayloadKind = PayloadKind> {
        kind: K;
        supportsRecursiveDirectTransfer?: boolean;
        "[asyncDispose]"(): Promise<void>;
        canDirectTransfer?(other: IOProvider): boolean;
        createContainer?(path: string): Promise<void>;
        delete?(path: string): Promise<void>;
        directCopy?(
            sourcePath: string,
            destPath: string,
            telemetry?: TransferTelemetry,
        ): Promise<void>;
        directMove?(
            sourcePath: string,
            destPath: string,
            telemetry?: TransferTelemetry,
        ): Promise<void>;
        getMultipartWriter?(
            path: string,
            partSize: number,
            opts?: { resume?: ResumeToken },
        ): MultipartWriter<K>;
        getPartSizeConstraints?(totalSize: number): PartSizeConstraints;
        getProperties(path: string): Promise<EntryProperties>;
        getReadableStream(path: string): Promise<StreamHandle<K>>;
        getWritableStream(
            path: string,
            opts?: { resume?: ResumeToken },
        ): Promise<StreamHandle<K> & { startOffset?: number }>;
        joinKey?(containerKey: string, name: string): string;
        list?(
            path: string,
            options?: { recursive?: boolean; regex?: RegExp },
        ): AsyncIterable<{ path: string; properties: EntryProperties }>;
        setProperties?(path: string, changes: EntryPropertyChanges): Promise<void>;
    }

    Type Parameters

    Index
    kind: K

    The single payload kind this provider natively produces/consumes.

    supportsRecursiveDirectTransfer?: boolean

    Whether directCopy/directMove accept a container sourcePath and recurse internally. When false/omitted, the framework never calls directCopy/directMove with a container path - it falls back to listing the container and transferring each entry individually (which may still use directCopy/directMove per entry).

    • Provider-specific multipart upload (e.g. S3's multipart protocol). The read side needs no equivalent: any readable handle implementing RangeReadable can be read in parts.

      With resume, a token from a previous writer's resumeToken(), the writer continues that upload: it re-checks which parts were actually committed and skips any part it is given again. The token's offset is the size of the committed parts before the first missing one, so the caller only needs to send the parts from that offset on.

      Parameters

      • path: string
      • partSize: number
      • Optionalopts: { resume?: ResumeToken }

      Returns MultipartWriter<K>