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

Function getSourceForPath

src/utils/settings/changeDetector.ts:362–375  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

360}
361
362function getSourceForPath(path: string): SettingSource | undefined {
363 // Normalize path because chokidar uses forward slashes on Windows
364 const normalizedPath = platformPath.normalize(path)
365
366 // Check if the path is inside the managed-settings.d/ drop-in directory
367 const dropInDir = getManagedSettingsDropInDir()
368 if (normalizedPath.startsWith(dropInDir + platformPath.sep)) {
369 return 'policySettings'
370 }
371
372 return SETTING_SOURCES.find(
373 source => getSettingsFilePathForSource(source) === normalizedPath,
374 )
375}
376
377/**
378 * Start polling for MDM settings changes (registry/plist).

Callers 3

handleChangeFunction · 0.85
handleAddFunction · 0.85
handleDeleteFunction · 0.85

Calls 1

Tested by

no test coverage detected