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

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i system-disk

    Weekly Downloads

    9

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.73 kB

    Total Files

    5

    Last publish

    Collaborators

    • knutkirkhorn