Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
drivelist
Advanced tools
List all connected drives in your computer, in all major operating systems.
Notice that this module does not require admin privileges to get the drives in any operating system supported.
Supports:
Examples (the output will vary depending on your machine):
var drivelist = require('drivelist');
drivelist.list(function(error, disks) {
if (error) throw error;
console.log(disks);
});
Mac OS X:
[
{
device: '/dev/disk0',
description: 'GUID_partition_scheme',
size: '*750.2 GB'
mountpoint: '/',
system: true
},
{
device: '/dev/disk1',
description: 'Apple_HFS Macintosh HD',
size: '*748.9 GB',
system: true
}
]
GNU/Linux
[
{
device: '/dev/sda',
description: 'WDC WD10JPVX-75J',
size: '931.5G',
mountpoint: '/',
system: true
},
{
device: '/dev/sr0',
description: 'DVD+-RW GU90N',
size: '1024M',
system: false
}
]
Windows
[
{
device: '\\\\.\\PHYSICALDRIVE0',
description: 'WDC WD10JPVX-75JC3T0',
size: '1000 GB'
mountpoint: 'C:',
system: true
},
{
device: '\\\\.\\PHYSICALDRIVE1',
description: 'Generic STORAGE DEVICE USB Device',
size: '15 GB'
mountpoint: 'D:',
system: false
}
]
Install drivelist
by running:
$ npm install --save drivelist
List available drives.
The function will throw an error if you attempt to call it from an unsupported operating system.
error
is a possible error.drives
is an array of objects describing the drives found.Run the test suite by doing:
$ gulp test
We're looking forward to support more operating systems. Please raise an issue or even better, send a PR to increase support!
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
$ gulp lint
If you're having any problem, please raise an issue on GitHub.
The project is licensed under the MIT license.
v2.0.6
FAQs
List all connected drives in your computer, in all major operating systems
The npm package drivelist receives a total of 7,671 weekly downloads. As such, drivelist popularity was classified as popular.
We found that drivelist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.