1.1.18 • Published 6 months ago
@wwa/statvfs v1.1.18
node-statvfs
This module provides Node.js bindings for the uv_fs_statfs()
function.
Example
const { statvfs, statvfsSync } = require('@wwa/statvfs');
// Asynchronous API, uses uv_fs_statfs()
statvfs('/').then((stat) => {
console.log('Total space:', stat.blocks * stat.bsize / 1073741824, 'GiB');
console.log('Free space:', stat.bfree * stat.bsize / 1073741824, 'GiB');
console.log('Available space:', stat.bavail * stat.bsize / 1073741824, 'GiB');
console.log('Total inodes:', stat.files);
console.log('Free inodes:', stat.ffree);
});
// Synchronous API (since 1.1.0), uses statvfs()
const stat = statvfsSync('/');
console.log('Total space:', stat.blocks * stat.bsize / 1073741824, 'GiB');
console.log('Free space:', stat.bfree * stat.bsize / 1073741824, 'GiB');
console.log('Available space:', stat.bavail * stat.bsize / 1073741824, 'GiB');
console.log('Total inodes:', stat.files);
console.log('Free inodes:', stat.ffree);
1.1.18
6 months ago
1.1.17
9 months ago
1.1.16
12 months ago
1.1.15
1 year ago
1.1.14
1 year ago
1.1.13
2 years ago
1.1.12
2 years ago
1.1.11
3 years ago
1.1.10
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.4
3 years ago
1.0.2
4 years ago
1.0.3
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago