removedrive

1.1.2 • Public • Published

removedrive

npm version dependencies Build status

Safely remove a drive on Windows.

Installation

Install removedrive by running:

$ npm install --save removedrive

Documentation

removedrive.eject(driveLetter, callback)

Running this function requires administration permissions.

Kind: static method of removedrive
Summary: Eject a drive by it's letter or identifier
Access: public

Param Type Description
driveLetter String drive letter
callback function callback (error)

Example

removedrive.eject('D', function(error) {
  if (error) throw error;
});

Example

removedrive.eject('\\\\.\\PHYSICALDRIVE2', function(error) {
  if (error) throw error;
});

Support

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

Tests

Run the test suite by doing:

$ gulp test

Contribute

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

$ gulp lint

License

The project is licensed under the MIT license.

Package Sidebar

Install

npm i removedrive

Weekly Downloads

3

Version

1.1.2

License

MIT

Last publish

Collaborators

  • jviotti