(path: string)
| 360 | } |
| 361 | |
| 362 | function 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). |
no test coverage detected