system-disk
v2.0.0
Published
Get the system disk of the computer
Downloads
20
Maintainers
Readme
system-disk
Get the system disk of the computer (e.g.
C:
or/dev/sda
)
For Windows this module uses the %SystemDrive%
environment variable and the mount
command for macOS and Linux.
Installation
npm install system-disk
Usage
import systemDisk from 'system-disk';
const disk = await systemDisk();
console.log(disk);
// => C:
API
systemDisk()
Returns the disk on the computer where the operating system is stored (the boot disk).
Related
- @knutkirkhorn/free-space - Get the amount of free space for a drive