![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-disk-info
Advanced tools
Node module to get disk information in Windows, Linux, Mac, FreeBSD & OpenBSD. It works with Electron.
Node module to get disk information in Windows, Linux, Mac, FreeBSD & OpenBSD. It works with Electron. The library will call system command to get drives info, parse the results and load info in array. Inspired by diskinfo.
npm install --save node-disk-info
See the example script for usage. You can run it with npm run example
.
// const nodeDiskInfo = require('node-disk-info'); => Use this when install as a dependency
const nodeDiskInfo = require('./dist/index');
// async way
nodeDiskInfo.getDiskInfo()
.then(disks => {
printResults('ASYNC WAY', disks);
})
.catch(reason => {
console.error(reason);
});
// sync way
try {
const disks = nodeDiskInfo.getDiskInfoSync();
printResults('SYNC WAY', disks);
} catch (e) {
console.error(e);
}
function printResults(title, disks) {
console.log(`============ ${title} ==============\n`);
for (const disk of disks) {
console.log('Filesystem:', disk.filesystem);
console.log('Blocks:', disk.blocks);
console.log('Used:', disk.used);
console.log('Available:', disk.available);
console.log('Capacity:', disk.capacity);
console.log('Mounted:', disk.mounted, '\n');
}
}
Output (example run on Windows):
============ SYNC WAY ==============
Filesystem: Disco fijo local
Blocks: 119387713536
Used: 109906608128
Available: 9481105408
Capacity: 92%
Mounted: C:
Filesystem: Disco fijo local
Blocks: 925015994368
Used: 639386984448
Available: 285629009920
Capacity: 69%
Mounted: D:
Filesystem: Disco CD-ROM
Blocks: 0
Used: 0
Available: 0
Capacity: 0%
Mounted: E:
============ ASYNC WAY ==============
Filesystem: Disco fijo local
Blocks: 119387713536
Used: 109906608128
Available: 9481105408
Capacity: 92%
Mounted: C:
Filesystem: Disco fijo local
Blocks: 925015994368
Used: 639386984448
Available: 285629009920
Capacity: 69%
Mounted: D:
Filesystem: Disco CD-ROM
Blocks: 0
Used: 0
Available: 0
Capacity: 0%
Mounted: E:
See the Releases page for a list of all releases, including changes.
If you run into any issues, please email me at contact@cristiammercado.com or you can use the contact form in my page.
For bug reports, please open an issue on GitHub.
git checkout -b my-new-feature
).git commit -am 'Added some feature'
).git push origin my-new-feature
).FAQs
Node module to get disk information in Windows, Linux, Mac, FreeBSD & OpenBSD. It works with Electron.
The npm package node-disk-info receives a total of 5,959 weekly downloads. As such, node-disk-info popularity was classified as popular.
We found that node-disk-info 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.