MCPcopy
hub / github.com/codeaashu/claude-code / isDuplicatePath

Function isDuplicatePath

src/utils/fsOperations.ts:187–198  ·  view source on GitHub ↗
(
  fs: FsOperations,
  filePath: string,
  loadedPaths: Set<string>,
)

Source from the content-addressed store, hash-verified

185 * @returns true if the file should be skipped (is duplicate)
186 */
187export function isDuplicatePath(
188 fs: FsOperations,
189 filePath: string,
190 loadedPaths: Set<string>,
191): boolean {
192 const { resolvedPath } = safeResolvePath(fs, filePath)
193 if (loadedPaths.has(resolvedPath)) {
194 return true
195 }
196 loadedPaths.add(resolvedPath)
197 return false
198}
199
200/**
201 * Resolve the deepest existing ancestor of a path via realpathSync, walking

Callers 5

collectMarkdownFilesFunction · 0.85
loadSkillsFromDirectoryFunction · 0.85
loadAgentFromFileFunction · 0.85
loadOutputStyleFromFileFunction · 0.85

Calls 3

safeResolvePathFunction · 0.85
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected