INNER CODE UNIT · TypeScript

isExographProject

exograph/exograph · error-report-testing/src/index.ts:24

function isExographProject(directory: string): boolean {
  const indexExoPath = path.join(directory, 'src', 'index.exo');
  return fs.existsSync(indexExoPath);
}

function exographProjects(startPath: string): string[] {
  let results: string[] = [];

  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);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…