Set a file's content, or remove the file for null.
(root: string, rel: string, content: string | null)
| 445 | |
| 446 | /** Set a file's content, or remove the file for null. */ |
| 447 | function put(root: string, rel: string, content: string | null): void { |
| 448 | if (content === null) fs.rmSync(path.join(root, rel)); |
| 449 | else write(root, { [rel]: content }); |
| 450 | } |
| 451 | |
| 452 | async function index(root: string): Promise<CodeGraph> { |
| 453 | const graph = await CodeGraph.init(root, { index: true }); |
no test coverage detected