New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

diskusage-ng

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diskusage-ng

Get disk usage info in pure JS via OS built-in tools

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

diskusage-ng - get disk usage info in pure JavaScript and without any dependencies

Build Status

Supported operating systems:

  • Windows (via WMIC)
  • OSX/Linux/Posix (via df)

Usage

var diskusage = require('diskusage-ng');

diskusage('/home/me', function(err, usage) {
	if (err) return console.log(err);

	console.log(usage.total);
	console.log(usage.used);
	console.log(usage.available);
});

Commands

npm run test

Credits

  • Thanks to @xiaoxiangmoe for providing TypeScript type definitions.

  • Thanks to @Congelli501 for replacing child_process.exec with child_process.execFile on POSIX systems making the code much more secure.

  • Thanks to @mintaka-orionis for fixing long paths issue on POSIX systems.

Keywords

diskusage

FAQs

Package last updated on 15 Jan 2023

Did you know?

Socket

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.

Install

Related posts