Skip to content

juangm/node-samba-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-Samba-Client

npm version Known Vulnerabilities

Overview

  • node-samba-client is a wrapper for smbclient for linux systems to interact with SMB/CIFS file sharing protocol.

Requirements

  • Requires Node.js 10+
  • Smbclient must be installed.
  • This can be installed on Ubuntu with apt install smbclient.

Installation

Just run >>> npm install @juangm/samba-client

Example (using Typescript)

    import { SambaClient } from '@juangm/samba-client'

    const config: SmbConfig = {
        address: '//server/folder',
        domain: 'WORKGROUP',
        username: 'guest',
        password: 'test'
        path: '...',
        others: '...',
    };

    const client = new SambaClient(config);

    // send a file
    await client.sendFile('somePath/file', 'destinationFolder/name');

    // get a file
    await client.getFile('someRemotePath/file', 'destinationFolder/name');

Future Plans

  • Add support for Mac using smbutil
  • Implement tests to check basic functionality
  • Create CI with github actions

About

Node.js wrapper for smbclient

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • TypeScript 100.0%