MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / executeFileChangedHooks

Function executeFileChangedHooks

src/utils/hooks.ts:4437–4453  ·  view source on GitHub ↗
(
  filePath: string,
  event: 'change' | 'add' | 'unlink',
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)

Source from the content-addressed store, hash-verified

4435}
4436
4437export function executeFileChangedHooks(
4438 filePath: string,
4439 event: 'change' | 'add' | 'unlink',
4440 timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
4441): Promise<{
4442 results: HookOutsideReplResult[]
4443 watchPaths: string[]
4444 systemMessages: string[]
4445}> {
4446 const hookInput = {
4447 ...createBaseHookInput(undefined),
4448 hook_event_name: 'FileChanged' as const,
4449 file_path: filePath,
4450 event,
4451 } as unknown as FileChangedHookInput
4452 return executeEnvHooks(hookInput, timeoutMs)
4453}
4454
4455export type InstructionsLoadReason =
4456 | 'session_start'

Callers 1

handleFileEventFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeEnvHooksFunction · 0.85

Tested by

no test coverage detected