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
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseLight multi-platform disk space checker without third party for Node.js.
npm install check-disk-space
// 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
})