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

Function rootPathForSource

src/utils/permissions/filesystem.ts:746–759  ·  view source on GitHub ↗
(source: PermissionRuleSource)

Source from the content-addressed store, hash-verified

744}
745
746function rootPathForSource(source: PermissionRuleSource): string {
747 switch (source) {
748 case 'cliArg':
749 case 'command':
750 case 'session':
751 return expandPath(getOriginalCwd())
752 case 'userSettings':
753 case 'policySettings':
754 case 'projectSettings':
755 case 'localSettings':
756 case 'flagSettings':
757 return getSettingsRootPathForSource(source)
758 }
759}
760
761function prependDirSep(path: string): string {
762 return posix.join(DIR_SEP, path)

Callers 1

patternWithRootFunction · 0.85

Calls 3

expandPathFunction · 0.85
getOriginalCwdFunction · 0.85

Tested by

no test coverage detected