(callback)
| 45 | } |
| 46 | |
| 47 | async read(callback) { |
| 48 | if (typeof callback === 'function') { |
| 49 | try { |
| 50 | const result = this.readSync(); |
| 51 | process.nextTick(callback, null, result); |
| 52 | } catch (err) { |
| 53 | process.nextTick(callback, err); |
| 54 | } |
| 55 | return; |
| 56 | } |
| 57 | return this.readSync(); |
| 58 | } |
| 59 | |
| 60 | closeSync() { |
| 61 | if (this.#closed) { |