Socket
Socket
Sign inDemoInstall

check-disk-space

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    check-disk-space

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


Version published
Weekly downloads
860K
decreased by-20.63%
Maintainers
1
Install size
20.1 kB
Created
Weekly downloads
 

Readme

Source

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
})

Keywords

FAQs

Last updated on 21 May 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