()
| 35 | } |
| 36 | |
| 37 | readSync() { |
| 38 | if (this.#closed) { |
| 39 | throw new ERR_DIR_CLOSED(); |
| 40 | } |
| 41 | if (this.#index >= this.#entries.length) { |
| 42 | return null; |
| 43 | } |
| 44 | return this.#entries[this.#index++]; |
| 45 | } |
| 46 | |
| 47 | async read(callback) { |
| 48 | if (typeof callback === 'function') { |