MCPcopy Create free account
hub / github.com/Noumena-Network/code / rootPathForSource

Function rootPathForSource

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

Source from the content-addressed store, hash-verified

754}
755
756function rootPathForSource(source: PermissionRuleSource): string {
757 switch (source) {
758 case 'cliArg':
759 case 'command':
760 case 'session':
761 return expandPath(getOriginalCwd())
762 case 'userSettings':
763 case 'policySettings':
764 case 'projectSettings':
765 case 'localSettings':
766 case 'flagSettings':
767 return getSettingsRootPathForSource(source)
768 }
769}
770
771function prependDirSep(path: string): string {
772 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