(dir: string, files: Files)
| 62 | }); |
| 63 | |
| 64 | function write(dir: string, files: Files): void { |
| 65 | for (const [file, text] of Object.entries(files)) { |
| 66 | const full = path.join(dir, file); |
| 67 | if (text === null) { |
| 68 | fs.rmSync(full, { force: true }); |
| 69 | continue; |
| 70 | } |
| 71 | fs.mkdirSync(path.dirname(full), { recursive: true }); |
| 72 | fs.writeFileSync(full, text); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** Every node and edge by natural key, edge metadata included, so two indexes of the same files compare directly. */ |
| 77 | function graphOf(graph: CodeGraph): string[] { |
no test coverage detected