README
SMB2 Client for Node.js
Introduction
This library is a simple implementation of SMB2 for Node.js. It allows you to access a SMB2 share as if you were using the native fs library.
The development is still at an experimental stage and should not be yet considered for production environment.
Installation
npm install -S smb2
API
var smb2Client = new SMB2 ( options )
The SMB2 class is the constructor of your SMB2 client.
the parameter options
accepts this list of attributes:
share
(mandatory): the share you want to accessdomain
(mandatory): the domain of which the user is registredusername
(mandatory): the username of the user that access the sharepassword
(mandatory): the passwordport
(optional): default445
, the port of the SMB serverpacketConcurrency
(optional): default20
, the number of simulatanous packet when writting / reading data from the shareautoCloseTimeout
(optional): default10000
, the timeout in milliseconds before to close the SMB2 session and the socket, if setted to0
the connection will never be closed unless you do it
Example:
// load the library
var SMB2 = require('smb2');
// create an SMB2 instance
var smb2Client = new SMB2({
share:'\\\\000.000.000.000\\c