(path)
| 140 | #realpathCache = new SafeMap(); |
| 141 | |
| 142 | stat(path) { |
| 143 | const cached = this.#statsCache.get(path); |
| 144 | if (cached) { |
| 145 | return cached; |
| 146 | } |
| 147 | const promise = getDirent(path); |
| 148 | this.#statsCache.set(path, promise); |
| 149 | return promise; |
| 150 | } |
| 151 | statSync(path) { |
| 152 | const cached = this.#statsCache.get(path); |
| 153 | // Do not return a promise from a sync function. |