INNER CODE UNIT · TypeScript
searchDirectories
exograph/exograph · error-report-testing/src/index.ts:32
function searchDirectories(currentPath: string) {
const filesAndDirs = fs.readdirSync(currentPath);
for (const fileOrDir of filesAndDirs) {
const fullPath = path.join(currentPath, fileOrDir);
const stat = fs.statSync(fullPath);
if (stat.isDirectory()) {
if (isExographProject(fullPath)) {
results.push(fullPath);
}
searchDirectories(fullPath);
}
}
}
searchDirectories(startPath);
return results;