MCPcopy
hub / github.com/alibaba/nacos / getRootPath

Function getRootPath

console-ui/test/sample/configurationManagement.spec.js:735–744  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

733}
734
735function getRootPath() {
736 let rootPath = path.resolve(__dirname);
737 while (rootPath) {
738 if (fs.existsSync(rootPath + '/config.json')) {
739 break;
740 }
741 rootPath = rootPath.substring(0, rootPath.lastIndexOf(path.sep));
742 }
743 return rootPath;
744}
745
746function mkdirs(dirname) {
747 if (fs.existsSync(dirname)) {

Callers 1

Calls 2

resolveMethod · 0.65
substringMethod · 0.45

Tested by

no test coverage detected