()
| 16 | } |
| 17 | |
| 18 | async read(): Promise<string | null> { |
| 19 | let data |
| 20 | |
| 21 | try { |
| 22 | data = await readFile(this.#filename, 'utf-8') |
| 23 | } catch (e) { |
| 24 | if ((e as NodeJS.ErrnoException).code === 'ENOENT') { |
| 25 | return null |
| 26 | } |
| 27 | throw e |
| 28 | } |
| 29 | |
| 30 | return data |
| 31 | } |
| 32 | |
| 33 | write(str: string): Promise<void> { |
| 34 | return this.#writer.write(str) |
no outgoing calls
no test coverage detected