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

    Function generateActions

    • Converts a paired source/dest tuple into zero or more sync actions based on the sync direction, compare mode, and keep policy. For compareMode: 'sha1', prefer the high-level synchronize() API so local file hashes and comparable B2 hashes are prepared before actions are generated. Low-level callers must pass pairs with local contentSha1 values already computed and B2 contentSha1 values containing any comparable metadata fallback.

      Parameters

      • pair: SyncPair

        The source/dest file pair from zipFolders.

      • direction: SyncDirection

        The sync direction.

      • compareMode: CompareMode

        How to compare files for differences.

      • keepMode: KeepMode

        Policy for destination-only files.

      • keepDays: number

        Retention period when keepMode is 'keep-days'.

      • nowMillis: number

        Current time in milliseconds, used for keep-days calculation.

      • factory: ActionFactory

        Factory to create the concrete action objects.

      • compareThreshold: number

        Tolerance for the comparison.

      Returns Generator<SyncAction>