@knutkirkhorn/free-space

    1.3.1 • Public • Published

    free-space

    Get the amount of free space for a drive

    Installation

    $ npm install @knutkirkhorn/free-space
    

    Usage

    const freeSpace = require('@knutkirkhorn/free-space');
    const prettyBytes = require('pretty-bytes');
    
    freeSpace().then(bytes => {
        console.log('Free space: ' + prettyBytes(bytes));
        // => Free space: 39.6 GB
    });
    
    freeSpace('c').then(bytes => {
        console.log('Free space: ' + prettyBytes(bytes));
        // => Free space: 39.6 GB
    });

    API

    freeSpace()

    Returns the amount of free space for the default drive.

    freeSpace(drive)

    Returns the amount of free space for a specified drive.

    Related

    License

    MIT © Knut Kirkhorn

    Install

    npm i @knutkirkhorn/free-space

    DownloadsWeekly Downloads

    9

    Version

    1.3.1

    License

    MIT

    Unpacked Size

    7.86 kB

    Total Files

    9

    Last publish

    Collaborators

    • knutkirkhorn