retro-imager/dependencies/mountutils
Floris Bos 5b072f3196 Build changes
- Add support for embedded Linux without X, dbus, udisks, ntp, etc.
- Misc minor changes
2020-05-25 00:36:16 +02:00
..
docs Qt/QML edition 2020-03-04 16:55:40 +01:00
scripts Qt/QML edition 2020-03-04 16:55:40 +01:00
src Qt/QML edition 2020-03-04 16:55:40 +01:00
.editorconfig Qt/QML edition 2020-03-04 16:55:40 +01:00
.eslintrc.yml Qt/QML edition 2020-03-04 16:55:40 +01:00
.gitignore Qt/QML edition 2020-03-04 16:55:40 +01:00
.npmignore Qt/QML edition 2020-03-04 16:55:40 +01:00
.travis.yml Qt/QML edition 2020-03-04 16:55:40 +01:00
appveyor.yml Qt/QML edition 2020-03-04 16:55:40 +01:00
binding.gyp Qt/QML edition 2020-03-04 16:55:40 +01:00
CHANGELOG.md Qt/QML edition 2020-03-04 16:55:40 +01:00
index.js Qt/QML edition 2020-03-04 16:55:40 +01:00
MANUAL_TESTS.md Qt/QML edition 2020-03-04 16:55:40 +01:00
package.json Qt/QML edition 2020-03-04 16:55:40 +01:00
README.md Qt/QML edition 2020-03-04 16:55:40 +01:00
requirements.txt Qt/QML edition 2020-03-04 16:55:40 +01:00

mountutils

npm npm license npm downloads Travis CI status AppVeyor status

Cross platform mount related utilities

Installation

Install mountutils by running:

$ npm install --save mountutils

Debug mode

You can enable debug mode by setting the MOUNTUTILS_DEBUG environment variable.

Documentation

mountutils.unmountDisk(device, callback)

Kind: static method of mountutils
Summary: Unmount a whole disk
Access: public

Param Type Description
device String device
callback function callback (error)

Example

// macOS
const drive = '/dev/disk2';

// GNU/Linux
const drive = '/dev/sdb';

// Windows
const drive = '\\\\.\\PHYSICALDRIVE2';

mountutils.unmountDisk(drive, (error) => {
  if (error) {
    throw error;
  }

  console.log('Done!');
});

Support

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

Tests

Run the test suite by doing:

$ npm test

Troubleshooting

error C2373: '__pfnDliNotifyHook2': redefinition

This error indicates that the version of npm you're running is too old. Upgrade by running:

npm install -g npm@latest

See the following node-gyp issue for more details.

Contribute

Dependencies

Before submitting a PR, please make sure that you include tests, and that linters run without any warning:

$ npm run lint

License

The project is licensed under the Apache 2.0 license.