( filepath: string | URL, )
| 238 | } |
| 239 | |
| 240 | async function parseFile( |
| 241 | filepath: string | URL, |
| 242 | ): Promise<Record<string, string>> { |
| 243 | try { |
| 244 | return parse(await Deno.readTextFile(filepath)); |
| 245 | } catch (e) { |
| 246 | if (e instanceof Deno.errors.NotFound) return {}; |
| 247 | throw e; |
| 248 | } |
| 249 | } |