@otapliger/blkid

0.2.1 • Public • Published

blkid

Node.js module for the blkid linux command

It requires root privileges to get actual information

Install

npm install @otapliger/blkid --save

Usage

const blkid = require('@otapliger/blkid')

// GET INFO FROM ALL PARTITIONS
blkid().then(response => {
  console.log(response)
})

// GET INFO FROM A SINGLE PARTITION
blkid.partition("/dev/sda1").then(response => {
  console.log(response)
})

// GET INFO FROM ALL PARTITIONS OF A SPECIFIC TYPE
blkid.fs("ext4").then(response => {
  console.log(response)
})

API

blkid()

Returns a promise for an array of partitions

blkid.partition(path)

Returns a promise for an array containing a specific partition

  • path - the path to the partition

blkid.fs(type)

Returns a promise for an array of partitions with a specific type of filesystem

  • type - the type of filesystem

LICENSE

MIT

Package Sidebar

Install

npm i @otapliger/blkid

Weekly Downloads

2

Version

0.2.1

License

MIT

Unpacked Size

3.9 kB

Total Files

5

Last publish

Collaborators

  • otapliger