
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-statvfs
Advanced tools
This module implements statvfs function call
Install with npm:
npm install statvfs
The module exposes 3 functions.
statvfs(path, callback): path should be a string and callback a function that takes an error and a statvfs object.statvfsAsync(path): returns a promise to return a statvfs object.statvfsSync(path): returns a statvfs object.Those functions may throw errors containing the standards statvfs error code.
const {statvfs, statvfsAsync, statvfsSync } = require('node-statvfs');
// Callbacks
statvfs("/", (err, info) => {
if (err) {
console.log(err);
}
else {
console.log(info);
}
});
// Promise
async function getStat(path) {
try {
const info = await statvfsAsync(path);
console.log(`blocks: ${info.f_blocks}`);
return info
} catch (err) {
console.error(err)
return 0
}
}
statvfsAsync("/")
.then(info => console.log(info))
.catch(err => console.error(err))
// Synchronous
try {
const info = statvfsSync("/");
console.log(info);
}
catch (err) {
console.log(err);
}
The module has an embedded .d.ts file.
{ f_bsize: 4096,
f_blocks: 475584404,
f_bfree: 469772396,
f_bavail: 450430908,
f_files: 120799232,
f_ffree: 120335422,
f_favail: 120335422,
f_fsid: 10784525436013701000,
f_namemax: 255,
f_frsize: 4096,
f_flag: 4096 }
FAQs
statvfs linux/windows.
We found that node-statvfs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.