Nutritious Pumpkin Mash

    mount-share

    1.0.1 • Public • Published

    mount-share

    Mount and dismount network shares on Windows.

    Installation

    npm install mount-share
    

    Quickstart

    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
    • 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 ❤️ by @MarkTiedemann.

    Install

    npm i mount-share

    DownloadsWeekly Downloads

    9

    Version

    1.0.1

    License

    WTFPL

    Last publish

    Collaborators

    • marktiedemann