(
directory: string,
visit: (path: string, entry: { name: string; isFile(): boolean; isDirectory(): boolean }) => Promise<void> | void,
)
| 304 | } |
| 305 | |
| 306 | async function walkWorkspace( |
| 307 | directory: string, |
| 308 | visit: (path: string, entry: { name: string; isFile(): boolean; isDirectory(): boolean }) => Promise<void> | void, |
| 309 | ): Promise<void> { |
| 310 | let entries; |
| 311 | try { |
| 312 | entries = await opendir(directory); |
| 313 | } catch { |
| 314 | return; |
| 315 | } |
| 316 | |
| 317 | for await (const entry of entries) { |
| 318 | const path = join(directory, entry.name); |
| 319 | if (entry.isDirectory()) { |
| 320 | if (!SKIPPED_CONTEXT_DIRS.has(entry.name)) { |
| 321 | await walkWorkspace(path, visit); |
| 322 | } |
| 323 | continue; |
| 324 | } |
| 325 | |
| 326 | await visit(path, entry); |
| 327 | } |
| 328 | } |
no outgoing calls
no test coverage detected