@backblaze-labs/b2-sdk - v0.2.0
    Preparing search index...

    Class B2Folder

    Scans a B2 bucket (optionally filtered by a raw B2 key prefix) and yields B2SyncPath entries sorted by compareSyncRelativePaths(relativePath). Hidden files are excluded. Raw B2 file names are used only as an internal tie-breaker after collision handling. All versions for the listed prefix are fetched, grouped, and sorted before yielding; exclude filters are applied client-side and do not reduce that B2 listing memory footprint. SDK-reserved temporary names fail the scan because syncing them could corrupt in-progress transfers.

    Implements

    Index

    Constructors

    • Creates a new B2Folder for the given bucket and optional prefix.

      Parameters

      • bucket: Bucket

        The B2 bucket to scan.

      • prefix: string = ''

        Optional raw B2 key prefix to restrict the scan scope. Backslashes are preserved as raw B2 key characters; pass / explicitly for slash prefixes.

      Returns B2Folder

    Properties

    appliesScanFilters: true = ...

    True when scan(filters) already enforces include/exclude filters itself as an optimization. The synchronizer still reapplies filters after custom scanner output as the SDK policy boundary. Custom folders that set this should use the exported filter helpers from @backblaze-labs/b2-sdk/sync to stay aligned with the SDK glob and RegExp dialect.

    appliesScanSorting: true = ...

    True when scan(filters) already yields entries in compareSyncRelativePaths order. Custom folders that omit this are sorted by synchronize() before pairing.

    rawPrefix: string

    Raw B2 key prefix this folder scans, preserving caller-provided separators verbatim.

    type: "b2" = ...

    Whether this folder is local or in B2.

    Methods