| 130 | } |
| 131 | |
| 132 | async statOrNull(path: string): Promise<WorkspaceStatResult | null> { |
| 133 | return withSpan( |
| 134 | this.#ws.observer, |
| 135 | "workspace.fs.statOrNull", |
| 136 | { "workspace.fs.path": path }, |
| 137 | async () => { |
| 138 | try { |
| 139 | return await this.#ws.fs.stat(path); |
| 140 | } catch (error) { |
| 141 | if ((error as { code?: string }).code === "ENOENT") return null; |
| 142 | throw error; |
| 143 | } |
| 144 | }, |
| 145 | ); |
| 146 | } |
| 147 | |
| 148 | lstat(path: string): Promise<WorkspaceStatResult> { |
| 149 | return withSpan(this.#ws.observer, "workspace.fs.lstat", { "workspace.fs.path": path }, () => |