MCPcopy Create free account
hub / github.com/mscdex/ssh2 / onwrite

Function onwrite

lib/protocol/SFTP.js:3994–4002  ·  view source on GitHub ↗
(er, bytes)

Source from the content-addressed store, hash-verified

3992 let writesLeft = data.length;
3993
3994 const onwrite = (er, bytes) => {
3995 if (er) {
3996 this.destroy();
3997 return cb(er);
3998 }
3999 this.bytesWritten += bytes;
4000 if (--writesLeft === 0)
4001 cb();
4002 };
4003
4004 // TODO: try to combine chunks to reduce number of requests to the server?
4005 for (let i = 0; i < data.length; ++i) {

Callers

nothing calls this directly

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…