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

Function trackFileCreation

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

Source from the content-addressed store, hash-verified

437 * Used when Claude creates a new file through a non-tracked mechanism.
438 */
439export function trackFileCreation(
440 state: AttributionState,
441 filePath: string,
442 content: string,
443 mtime: number = Date.now(),
444): AttributionState {
445 // A creation is simply a modification from empty to the new content
446 return trackFileModification(state, filePath, '', content, false, mtime)
447}
448
449/**
450 * 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