MCPcopy Create free account
hub / github.com/massCodeIO/massCode / isInsideRoot

Function isInsideRoot

src/main/http/import/opencollection.ts:78–84  ·  view source on GitHub ↗
(path: string, rootDir: string)

Source from the content-addressed store, hash-verified

76}
77
78function isInsideRoot(path: string, rootDir: string): boolean {
79 const normalized = normalizePath(path)
80 const normalizedRootDir = normalizePath(rootDir)
81 if (!normalizedRootDir)
82 return true
83 return normalized.startsWith(`${normalizedRootDir}/`)
84}
85
86function readYaml(file: HttpImportFile, warnings: HttpImportWarning[]) {
87 try {

Callers 1

parseOpenCollectionFilesFunction · 0.85

Calls 1

normalizePathFunction · 0.85

Tested by

no test coverage detected