Cross platform mount related utilities
Install mountutils
by running:
$ npm install --save mountutils
You can enable debug mode by setting the MOUNTUTILS_DEBUG
environment
variable.
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!');
});
If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.
Run the test suite by doing:
$ npm test
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.
- Issue Tracker: github.com/resin-io-modules/mountutils/issues
- Source Code: github.com/resin-io-modules/mountutils
Before submitting a PR, please make sure that you include tests, and that linters run without any warning:
$ npm run lint
The project is licensed under the Apache 2.0 license.