(dir: string, files: Files)
| 49 | }); |
| 50 | |
| 51 | function write(dir: string, files: Files): void { |
| 52 | for (const [file, text] of Object.entries(files)) { |
| 53 | const full = path.join(dir, file); |
| 54 | if (text === null) { |
| 55 | fs.rmSync(full, { force: true }); |
| 56 | continue; |
| 57 | } |
| 58 | fs.mkdirSync(path.dirname(full), { recursive: true }); |
| 59 | fs.writeFileSync(full, text); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | /** Every node and edge by natural key, edge metadata included, so two indexes of the same files compare directly. */ |
| 64 | function graphOf(graph: CodeGraph): string[] { |
no test coverage detected