check-disk-space

Light multi-platform disk space checker without third-party for Node.js

Latest version: 3.4.0 registry icon
Maintenance score
11
Safety score
100
Popularity score
59
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
3.4.0 0 0 0 0 0
3.3.1 0 0 0 0 0
3.3.0 0 0 0 0 0
3.2.0 0 0 0 0 0
3.1.0 0 0 0 0 0
3.0.1 0 0 0 0 0
3.0.0 0 0 0 0 0
2.1.0 0 0 0 0 0
2.0.0 0 0 0 0 0
1.5.0 0 0 0 0 0
1.4.0 0 0 0 0 0
1.3.0 0 0 0 0 0
1.2.0 0 0 0 0 0
1.1.0 0 0 0 0 0
1.0.0 0 0 0 0 0

Stability
Latest release:

3.4.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



Check disk space

Continue Integration check-disk-space on npm License MIT

Introduction

Light multi-platform disk space checker without third party for Node.js.

  • Works on Linux, macOS and Windows
  • Take care of mounting points on unix-like systems
  • No dependencies
  • TypeScript support

Install

npm install check-disk-space

Usage

// ES
import checkDiskSpace from 'check-disk-space'

// CommonJS
const checkDiskSpace = require('check-disk-space').default

// On Windows
checkDiskSpace('C:/blabla/bla').then((diskSpace) => {
    console.log(diskSpace)
    // {
    //     diskPath: 'C:',
    //     free: 12345678,
    //     size: 98756432
    // }
    // Note: `free` and `size` are in bytes
})

// On Linux or macOS
checkDiskSpace('/mnt/mygames').then((diskSpace) => {
    console.log(diskSpace)
    // {
    //     diskPath: '/',
    //     free: 12345678,
    //     size: 98756432
    // }
    // Note: `free` and `size` are in bytes
})