system-disk
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    2
    • latest

Version History

Package Sidebar

Install

npm i system-disk

Weekly Downloads

10

Version

2.0.0

License

MIT

Unpacked Size

3.73 kB

Total Files

5

Last publish

Collaborators

  • knutkirkhorn