Have ideas to improve npm?Join in the discussion! »

    denymount

    2.3.0 • Public • Published

    denymount

    Node.js library to prevent automatic mounting of specific disks on Mac OS X. For Mac OS X >= 10.9.

    npm version dependencies Build Status

    Installation

    Install denymount by running:

    $ npm install --save denymount

    Documentation

    denymount~denymount(disk, handler, [options], callback)

    Kind: inner method of denymount
    Summary: Prevent automatic mounting of an OS X disk
    Access: public

    Param Type Default Description
    disk String disk
    handler function handler (callback)
    [options] Object options
    [options.autoMountOnSuccess] Boolean false auto-mount on success
    [options.executablePath] String alternative path to the denymount binary executable invoked at runtime
    callback function callback (error)

    Example

    denymount('/dev/disk2', function(callback) {
      console.log('While this code runs, /dev/disk2 is ensured to not be auto-mounted');
      return callback(null, 'foo');
    }, {
      autoMountOnSuccess: true
    }, function(error, message) {
      if (error) {
        throw error;
      }
     
      console.log(message);
    });

    Tests

    Run the test suite by doing:

    $ npm test

    Development

    denymount wraps a native command line utility that must be built with Xcode 7.

    If you make edits to the executable source make sure to build it afterwards with:

    $ npm run build

    This will build and place the compiled executable in the bin folder.

    The command line utility can be used directly as follows:

    $ ./bin/denymount diskName

    The programme will keep running until you hit ctrl+C (or SIGINT/SIGTERM if sent to background).

    Contribute

    Support

    If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.

    License

    denymount is free software, and may be redistributed under the terms specified in the license.

    Install

    npm i denymount

    DownloadsWeekly Downloads

    349

    Version

    2.3.0

    License

    Apache-2.0

    Unpacked Size

    43.6 kB

    Total Files

    16

    Last publish

    Collaborators

    • avatar