1.0.7 • Published 5 years ago

@pitzzae/volume-list v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Volume-list

Native C library to get information about mouted volume.

Notice that this module does not require admin privileges to get volume information in any supported operating system.

Supports:

  • GNU/Linux distributions.
  • Mac OS X.

Install via npm

$ npm install @pitzzae/volume-list --save

Usage

const VolumeList = require('@pitzzae/volume-list');

Get all mouted volumes

let volume_list = VolumeList();

Output

[
  {
    "size": 999995129856,
    "used": 509489152,
    "free": 999485640704,
    "mount": "/Volumes/Recovery",
    "device": "/dev/disk1s1",
    "fstype": "apfs"
  },
  {
    "size": 999995129856,
    "used": 11811192832,
    "free": 988183937024,
    "mount": "/private/var/vm",
    "device": "/dev/disk1s1",
    "fstype": "apfs"
  },
  {
    "size": 346112,
    "used": 346112,
    "free": 0,
    "mount": "/dev",
    "device": "/dev/disk1s1",
    "fstype": "apfs"
  },
  {
    "size": 999995129856,
    "used": 650876833792,
    "free": 349118296064,
    "mount": "/",
    "device": "/dev/disk1s1",
    "fstype": "apfs"
  }
]

Get size of specific list path

let volume_list = VolumeList(["/tmp", "/"]);

Output

[
  {
    "size": 999995129856,
    "used": 650875514880,
    "free": 349119614976,
    "mount": "/",
    "device": "/dev/disk1s1",
    "fstype": "apfs",
    "path": "/"
  },
  {
    "size": 999995129856,
    "used": 650875514880,
    "free": 349119614976,
    "mount": "/",
    "device": "/dev/disk1s1",
    "fstype": "apfs",
    "path": "/tmp"
  }
]

Support

If you're having any problem, please raise an issue on GitHub.

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago