Wondering what’s next for npm?Check out our public roadmap! »

@knutkirkhorn/free-space

1.3.0 • Public • Published

free-space Build Status

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

3

Version

1.3.0

License

MIT

Unpacked Size

7.76 kB

Total Files

9

Last publish

Collaborators

  • avatar