Node-SMB / marsaud-smb2

SMB2 Client
53 stars 46 forks source link

Readme - Example of createWriteStream is wrong #51

Closed orekav closed 4 years ago

orekav commented 4 years ago
smb2Client.createWriteStream('path\\to\\the\\file', function(err, readStream) {
    if (err) throw err;
    var readStream = fs.createReadStream('localFile');
    readStream.pipe(writeStream);
});

Should be

smb2Client.createWriteStream('path\\to\\the\\file', function(err, writeStream) {
    if (err) throw err;
    var readStream = fs.createReadStream('localFile');
    readStream.pipe(writeStream);
});

Also, in order to use this library it should say const SMB2 = require("@marsaud/smb2"); instead of const SMB2 = require("smb2");

julien-f commented 4 years ago

Indeed, please create a PR for this, you can do so very easily by editing the file online, thank you 🙂

orekav commented 4 years ago

Done

julien-f commented 4 years ago

Thank you!