3.4.0 • Published 11 months ago

check-disk-space v3.4.0

Weekly downloads
88,029
License
MIT
Repository
github
Last release
11 months ago

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

11 months ago

3.3.1

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.5.0

6 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago