A SMB2 implementation in TypeScript.
$ npm i @bulentv/smb2
import smb2 from "@bulentv/smb2";
const client = new smb2.Client(host);
const session = await client.authenticate({
domain,
username,
password
});
const tree = await session.connectTree(share);
const entries = await tree.readDirectory("/");
console.log(entries);
- watch shares for file and directory changes
- create, read & remove & rename files
- create, list & remove & rename directories
- check directory/file exists
- SMB
- Server