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

    Function filesAreDifferent

    • Determines whether two files should be considered different based on the compare mode. For sha1, callers that use the low-level policy helpers should first prepare the pair so local hashes and comparable B2 hashes are populated.

      Parameters

      • source: SyncPath

        The source file metadata.

      • dest: SyncPath

        The destination file metadata.

      • compareMode: CompareMode

        The comparison strategy: 'modtime', 'size', 'sha1', or 'none'.

      • threshold: number = 0

        Tolerance for the comparison (bytes for size, milliseconds for modtime).

      Returns boolean

      true if the files are considered different.

      When compareMode is not one of the supported compare modes.