(p: string)
| 91 | return null; |
| 92 | }, |
| 93 | async readFile(p: string) { |
| 94 | const v = store.get(p); |
| 95 | if (v === undefined) throw Object.assign(new Error(`ENOENT: ${p}`), { code: 'ENOENT' }); |
| 96 | return v; |
| 97 | }, |
| 98 | async writeFile(p: string, data: string, opts?: { exclusive?: boolean }) { |
| 99 | if (opts?.exclusive && (store.has(p) || dirs.has(p))) { |
| 100 | throw Object.assign(new Error(`EEXIST: ${p}`), { code: 'EEXIST' }); |