MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getFileIdentity

Function getFileIdentity

src/skills/loadSkillsDir.ts:118–124  ·  view source on GitHub ↗

* Gets a unique identifier for a file by resolving symlinks to a canonical path. * This allows detection of duplicate files accessed through different paths * (e.g., via symlinks or overlapping parent directories). * Returns null if the file doesn't exist or can't be resolved. * * Uses realpath

(filePath: string)

Source from the content-addressed store, hash-verified

116 * See: https://github.com/anthropics/claude-code/issues/13893
117 */
118async function getFileIdentity(filePath: string): Promise<string | null> {
119 try {
120 return await realpath(filePath)
121 } catch {
122 return null
123 }
124}
125
126// Internal type to track skill with its file path for deduplication
127type SkillWithPath = {

Callers 1

loadSkillsDir.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected