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

Function hashFilePath

src/utils/fileOperationAnalytics.ts:9–16  ·  view source on GitHub ↗

* Creates a truncated SHA256 hash (16 chars) for file paths * Used for privacy-preserving analytics on file operations

(
  filePath: string,
)

Source from the content-addressed store, hash-verified

7 * Used for privacy-preserving analytics on file operations
8 */
9function hashFilePath(
10 filePath: string,
11): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS {
12 return createHash('sha256')
13 .update(filePath)
14 .digest('hex')
15 .slice(0, 16) as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
16}
17
18/**
19 * Creates a full SHA256 hash (64 chars) for file contents

Callers 1

logFileOperationFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected