Node.js module for the blkid linux command
It requires root privileges to get actual information
npm install @otapliger/blkid --save
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)
})
Returns a promise for an array of partitions
Returns a promise for an array containing a specific partition
- path - the path to the partition
Returns a promise for an array of partitions with a specific type of filesystem
- type - the type of filesystem