Socket
Socket
Sign inDemoInstall

@knutkirkhorn/free-space

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @knutkirkhorn/free-space

Get the amount of free space for a drive


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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.

  • system-disk - Get the system disk of the computer (e.g. C: or /dev/sda)
  • @knutkirkhorn/free-space-cli - CLI for this module

License

MIT © Knut Kirkhorn

Keywords

FAQs

Last updated on 21 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc