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

    Interface SyncScanOptions

    Options accepted by SyncFolder.scan. Includes filters plus an optional scan-level callback for paths the scanner cannot safely represent or test.

    interface SyncScanOptions {
        exclude?: readonly SyncFilterPattern[];
        include?: readonly SyncFilterPattern[];
        localSymlinks?: LocalSymlinkPolicy;
        maxScanEntries?: number;
        onError?: (event: SyncErrorEvent) => void;
        onSkip?: (event: SyncSkipEvent) => void;
        requireLocalSafePaths?: boolean;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index
    exclude?: readonly SyncFilterPattern[]

    Optional deny-list. Paths matching any exclude pattern are skipped even when they also match an include pattern. Excludes are client-side filters; they do not reduce B2 list API calls or the B2 scanner's version grouping and sort memory.

    include?: readonly SyncFilterPattern[]

    Optional allow-list. When present, only paths matching at least one pattern are scanned. B2 scans can push down only the safe literal prefix from slash-containing glob includes; other include filtering is client-side.

    localSymlinks?: LocalSymlinkPolicy

    How the built-in local scanner handles child symlinks. Defaults to 'skip'. 'follow' only follows targets that resolve inside the configured root and skips repeated followed directory identities. Symlinked roots are still followed because the configured root is the scan boundary.

    maxScanEntries?: number

    Maximum number of entries a scanner may retain before failing with a defined error instead of continuing toward unbounded heap growth. Defaults to the SDK scan limit.

    onError?: (event: SyncErrorEvent) => void

    Receives scan diagnostics. Built-in scanners may continue after recoverable per-path diagnostics, such as unreadable local children, but fatal scan failures still abort.

    onSkip?: (event: SyncSkipEvent) => void

    Receives scanner skip diagnostics. Built-in scans isolate callback errors so diagnostics handlers cannot abort the scan.

    requireLocalSafePaths?: boolean

    When true, B2 scanners skip names that cannot be written safely to a local filesystem destination and reject case/Unicode-canonical local path collisions.

    signal?: AbortSignal

    Optional signal checked by built-in scanners while enumerating. Aborting stops local traversal promptly and stops B2 scans before requesting the next page.