Async read that swallows all errors and returns null (best-effort).
(path: string)
| 1099 | |
| 1100 | /** Async read that swallows all errors and returns null (best-effort). */ |
| 1101 | async function readFileAsyncOrNull(path: string): Promise<string | null> { |
| 1102 | try { |
| 1103 | return await readFile(path, 'utf-8') |
| 1104 | } catch { |
| 1105 | return null |
| 1106 | } |
| 1107 | } |
| 1108 | |
| 1109 | const ENABLE_DUMP_STATE = false |
| 1110 | function maybeDumpStateForDebug(state: FileHistoryState): void { |
no test coverage detected