(dir: string)
| 395 | function findDemoFiles(root: string): Array<string> { |
| 396 | const results: Array<string> = [] |
| 397 | function walk(dir: string) { |
| 398 | let entries: Array<fs.Dirent> |
| 399 | try { |
| 400 | entries = fs.readdirSync(dir, { withFileTypes: true }) |
| 401 | } catch { |
| 402 | return |
| 403 | } |
| 404 | for (const entry of entries) { |
| 405 | const full = resolve(dir, entry.name) |
| 406 | if (entry.isDirectory()) { |
| 407 | if (CLEAN_DEMOS_SKIP_DIRS.has(entry.name)) continue |
| 408 | walk(full) |
| 409 | } else if (entry.isFile() && isDemoFilePath(full)) { |
| 410 | results.push(full) |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | walk(root) |
| 415 | return results.sort() |
| 416 | } |
no test coverage detected