| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c4f6077 commit d79d142
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,10 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | 3 | const { Math, Object } = primordials; | |
| 4 | 4 | ||
| 5 | - const { | ||
| 6 | - FSReqCallback, | ||
| 7 | - writeBuffers | ||
| 8 | - } = internalBinding('fs'); | ||
| 9 | 5 | const { | |
| 10 | 6 | ERR_INVALID_ARG_TYPE, | |
| 11 | 7 | ERR_OUT_OF_RANGE | |
@@ -325,18 +321,6 @@ WriteStream.prototype._write = function(data, encoding, cb) { | |||
| 325 | 321 | }; | |
| 326 | 322 | ||
| 327 | 323 | ||
| 328 | - function writev(fd, chunks, position, callback) { | ||
| 329 | - function wrapper(err, written) { | ||
| 330 | - // Retain a reference to chunks so that they can't be GC'ed too soon. | ||
| 331 | - callback(err, written || 0, chunks); | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - const req = new FSReqCallback(); | ||
| 335 | - req.oncomplete = wrapper; | ||
| 336 | - writeBuffers(fd, chunks, position, req); | ||
| 337 | - } | ||
| 338 | - | ||
| 339 | - | ||
| 340 | 324 | WriteStream.prototype._writev = function(data, cb) { | |
| 341 | 325 | if (typeof this.fd !== 'number') { | |
| 342 | 326 | return this.once('open', function() { | |
@@ -356,7 +340,7 @@ WriteStream.prototype._writev = function(data, cb) { | |||
| 356 | 340 | size += chunk.length; | |
| 357 | 341 | } | |
| 358 | 342 | ||
| 359 | - writev(this.fd, chunks, this.pos, function(er, bytes) { | ||
| 343 | + fs.writev(this.fd, chunks, this.pos, function(er, bytes) { | ||
| 360 | 344 | if (er) { | |
| 361 | 345 | self.destroy(); | |
| 362 | 346 | return cb(er); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments