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

Function trackFileCreation

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

trackFileModificationFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected