MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / trackFileCreation

Function trackFileCreation

source code/utils/commitAttribution.ts:441–449  ·  view source on GitHub ↗
(
  state: AttributionState,
  filePath: string,
  content: string,
  mtime: number = Date.now(),
)

Source from the content-addressed store, hash-verified

439 * Used when Claude creates a new file through a non-tracked mechanism.
440 */
441export function trackFileCreation(
442 state: AttributionState,
443 filePath: string,
444 content: string,
445 mtime: number = Date.now(),
446): AttributionState {
447 // A creation is simply a modification from empty to the new content
448 return trackFileModification(state, filePath, '', content, false, mtime)
449}
450
451/**
452 * Track a file deletion by Claude (e.g., via bash rm command).

Callers

nothing calls this directly

Calls 1

trackFileModificationFunction · 0.85

Tested by

no test coverage detected