1.1.18 • Published 2 years 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
2 years ago
1.1.17
2 years ago
1.1.16
2 years ago
1.1.15
2 years ago
1.1.14
2 years ago
1.1.13
3 years ago
1.1.12
3 years ago
1.1.11
4 years ago
1.1.10
4 years ago
1.1.9
4 years ago
1.1.8
4 years ago
1.1.7
4 years ago
1.1.6
4 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.4
5 years ago
1.0.2
5 years ago
1.0.3
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago