MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / countRemainingUploadConflicts

Function countRemainingUploadConflicts

frontend/src/hooks/useFileManager.ts:591–606  ·  view source on GitHub ↗
(
    files: SelectedUploadFile[],
    startIndex: number,
    occupiedNames: Set<string>
  )

Source from the content-addressed store, hash-verified

589 };
590
591 const countRemainingUploadConflicts = (
592 files: SelectedUploadFile[],
593 startIndex: number,
594 occupiedNames: Set<string>
595 ) => {
596 const simulatedOccupiedNames = new Set(occupiedNames);
597 let count = 0;
598
599 for (let i = startIndex; i < files.length; i++) {
600 const fileName = files[i].file.name;
601 if (simulatedOccupiedNames.has(fileName)) count += 1;
602 simulatedOccupiedNames.add(fileName);
603 }
604
605 return count;
606 };
607
608 const confirmUploadConflict = async (
609 fileName: string,

Callers 1

selectedFilesFunction · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected