videosphere
    Preparing search index...

    Function resolveUniqueBackupFileName

    • Picks the first available backup filename in a Windows-style duplicate series. When sermon.mp4 already exists, returns sermon (1).mp4, then sermon (2).mp4, and so on.

      Parameters

      • fileName: string

        Desired backup filename, including extension.

      • existingFileNames: Iterable<string>

        Filenames already present in the target remote directory.

      • Optionaloptions: { caseInsensitive?: boolean }

        Matching options for remote filesystem semantics.

        • OptionalcaseInsensitive?: boolean

          When true, treats names as equal regardless of case (SMB).

      Returns string

      A filename that does not collide with existingFileNames under the chosen rules.

      When every slot from the base name through MAX_BACKUP_FILE_COPY_SUFFIX is already occupied (not expected in practice).