( filepath: string | URL, )
| 297 | } |
| 298 | |
| 299 | async function parseFile( |
| 300 | filepath: string | URL, |
| 301 | ): Promise<Record<string, string>> { |
| 302 | try { |
| 303 | return parse(await Deno.readTextFile(filepath)); |
| 304 | } catch (e) { |
| 305 | if (e instanceof Deno.errors.NotFound) return {}; |
| 306 | throw e; |
| 307 | } |
| 308 | } |