(path: string)
| 38 | constructor(private readonly ws: WorkspaceLike) {} |
| 39 | |
| 40 | async stat(path: string): Promise<FileStat | null> { |
| 41 | try { |
| 42 | const s = await this.ws.fs.stat(path); |
| 43 | if (!s.isFile) return null; |
| 44 | return { size: s.size, mtime: s.mtime, mode: s.mode }; |
| 45 | } catch (err) { |
| 46 | if (isEnoent(err)) return null; |
| 47 | throw err; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | async readAll(path: string): Promise<Uint8Array | null> { |
| 52 | try { |