(filepath: string)
| 662 | * Create an empty file (and directories leading to it), leaving it alone if already present. |
| 663 | */ |
| 664 | export async function ensureFileExists(filepath: string): Promise<void> { |
| 665 | await fs.mkdir(path.dirname(filepath), {recursive: true}); |
| 666 | await (await fs.open(filepath, 'a')).close(); |
| 667 | } |