(handle, path, options)
| 50 | #handlerQueue = []; |
| 51 | |
| 52 | constructor(handle, path, options) { |
| 53 | if (handle == null) throw new ERR_MISSING_ARGS('handle'); |
| 54 | this.#handle = handle; |
| 55 | this.#path = path; |
| 56 | this.#options = { |
| 57 | bufferSize: 32, |
| 58 | ...getOptions(options, { |
| 59 | encoding: 'utf8', |
| 60 | }), |
| 61 | }; |
| 62 | |
| 63 | try { |
| 64 | validateUint32(this.#options.bufferSize, 'options.bufferSize', true); |
| 65 | } catch (validationError) { |
| 66 | // Userland won't be able to close handle if we throw, so we close it first |
| 67 | this.#handle.close(); |
| 68 | throw validationError; |
| 69 | } |
| 70 | |
| 71 | this.#readPromisified = FunctionPrototypeBind( |
| 72 | promisify(this.#readImpl), this, false); |
| 73 | this.#closePromisified = FunctionPrototypeBind( |
| 74 | promisify(this.close), this); |
| 75 | } |
| 76 | |
| 77 | get path() { |
| 78 | if (!(#path in this)) |
nothing calls this directly
no test coverage detected