@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 ChunkKind this provider natively produces/consumes - e.g. a pure-TS filesystem plugin is IOProvider<"js">, a Rust-FFI-backed plugin is IOProvider<"native">.

    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 ChunkKind = ChunkKind> {
        kind: K;
        "[asyncDispose]"(): Promise<void>;
        canDirectTransfer?(other: IOProvider): boolean;
        delete(path: string): Promise<void>;
        directCopy?(sourcePath: string, destPath: string): Promise<void>;
        directMove?(sourcePath: string, destPath: string): Promise<void>;
        getMultipartReader(path: string): AsyncIterable<Part<K>>;
        getMultipartWriter(
            path: string,
        ): { write(parts: AsyncIterable<Part<K>>): Promise<void> };
        getProperties(path: string): Promise<ItemProperties>;
        getReadableStream(path: string): Promise<StreamHandle<K>>;
        getWritableStream(path: string): Promise<StreamHandle<K>>;
        list(
            path: string,
            options?: { recursive?: boolean; regex?: RegExp },
        ): AsyncIterable<{ path: string; properties: ItemProperties }>;
        setProperties(
            path: string,
            properties: Partial<Record<string, unknown>>,
        ): Promise<void>;
    }

    Type Parameters

    Index
    kind: K

    The single chunk kind this provider natively produces/consumes.

    • Returns Promise<void>

    • Self-reported direct-transfer eligibility - the provider owns what "same" means for its backend (e.g. same mount for filesystem, same bucket+region+credentials for object storage).

      Parameters

      Returns boolean

    • Parameters

      • path: string

      Returns Promise<void>

    • Parameters

      • sourcePath: string
      • destPath: string

      Returns Promise<void>

    • Parameters

      • sourcePath: string
      • destPath: string

      Returns Promise<void>

    • Parameters

      • path: string

      Returns AsyncIterable<Part<K>>

    • Parameters

      • path: string

      Returns { write(parts: AsyncIterable<Part<K>>): Promise<void> }

    • Parameters

      • path: string
      • Optionaloptions: { recursive?: boolean; regex?: RegExp }

      Returns AsyncIterable<{ path: string; properties: ItemProperties }>

    • Parameters

      • path: string
      • properties: Partial<Record<string, unknown>>

      Returns Promise<void>