@flowscripter/io-plugin-filesystem
    Preparing search index...

    Class FilesystemIOProvider

    Local filesystem source/sink provider. All paths are resolved and sandboxed against rootPath via resolvePath - a path that would escape the root is rejected rather than followed. rootPath === "" means "no restriction" (see resolvePath) - preserved here rather than eagerly resolved, since resolve("") would otherwise collapse it to cwd before resolvePath ever sees the sentinel.

    Implements

    • IOProvider<PayloadKind.Js>
    Index
    kind: Js = PayloadKind.Js

    The single payload kind this provider natively produces/consumes.

    rootPath: string
    supportsRecursiveDirectTransfer: true

    directCopy/directMove accept a directory sourcePath and recurse internally.

    • 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

      • other: IOProvider

      Returns boolean

    • Creates an empty container at path (idempotent - mkdir-p style). Used by non-direct recursive copy/move to recreate source containers that hold no entries at the destination. Providers whose backend has no real container concept can omit this.

      Parameters

      • path: string

      Returns Promise<void>

    • Parameters

      • path: string

      Returns Promise<void>

    • Parameters

      • sourcePath: string
      • destPath: string
      • Optional_telemetry: TransferTelemetry

      Returns Promise<void>

    • Parameters

      • sourcePath: string
      • destPath: string
      • Optional_telemetry: TransferTelemetry

      Returns Promise<void>

    • 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

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

    • Reports this provider's part-size bounds for a multipart transfer of an entry of totalSize bytes (e.g. S3's minimum part size and 10000-part cap). Omit when the provider has no such constraints - the framework treats a missing implementation as unconstrained.

      Parameters

      • _totalSize: number

      Returns PartSizeConstraints

    • Parameters

      • path: string

      Returns Promise<EntryProperties>

    • Parameters

      • path: string

      Returns Promise<StreamHandle<Js> & RangeReadable<Js>>

    • Opens a writable stream. With resume, the provider re-checks what was actually committed and continues from there, reporting the real resume position as startOffset (bytes).

      Parameters

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

      Returns Promise<StreamHandle<Js> & ResumableWritable & { startOffset: number }>

    • Builds a child key from a container key and a child name. Omit to use the framework default (/-join).

      Parameters

      • containerKey: string
      • name: string

      Returns string

    • Lists the entries in a container. Omitted by protocols with no container concept.

      Parameters

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

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

    • Omitted by protocols with no generic way to change entry properties.

      Parameters

      • path: string
      • changes: EntryPropertyChanges

      Returns Promise<void>