1.0.1 • Published 9 years ago
mount-share v1.0.1
mount-share
Mount and dismount network shares on Windows.
Installation
npm install mount-shareQuickstart
const share = require('mount-share')({
server: 'multimedia-homeserver',
share: 'music-collection',
drive: 'M'
username: 'uncreative-username',
password: 'super-secret-password'
})
share.mount()
.then(() => console.log('mounted!'))
// some time later
share.dismount()
.then(() => console.log('dismounted!'))API
require('mount-share')(options)
- options
<Object>:- server
<String>: required - share
<String>: required - drive
<String>: default:X - username
<String>: optional - password
<String>: optional
- server
- returns the share
<Object>
share.mount()
- returns a
<Promise>which:- resolves if the share was mounted
- rejects if an error occured
share.dismount()
- returns a
<Promise>which:- resolves if the share was dismounted
- rejects if an error occured
License
WTFPL – Do What the F*ck You Want to Public License.
Made with :heart: by @MarkTiedemann.