easydisk
v0.1.2
Published
find disk and show size
Downloads
5
Readme
easydisk
Install
npm i easydisk
Usage
get disk store
Get Store ALL
const easydisk = require('easydisk')
console.log(easydisk.getDiskStore());
result windows
[{
"Name": "C:",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "D:",
"FreeSpace": "10.03",
"Used": "29.04",
"Size": "39.06",
"Percent": "25.67",
"Unit": "G"
}, {
"Name": "E:",
"FreeSpace": "245.91",
"Used": "47.06",
"Size": "292.97",
"Percent": "83.94",
"Unit": "G"
}, {
"Name": "F:",
"FreeSpace": "58.37",
"Used": "234.60",
"Size": "292.97",
"Percent": "19.92",
"Unit": "G"
}, {
"Name": "G:",
"FreeSpace": "260.61",
"Used": "84.83",
"Size": "345.45",
"Percent": "75.44",
"Unit": "G"
}]
result linux
[{
"Name": "/",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/dev",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/run",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/run/lock",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/run/shm",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/run/user",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/mnt/c",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}, {
"Name": "/mnt/d",
"FreeSpace": "10.03",
"Used": "29.04",
"Size": "39.06",
"Percent": "25.68",
"Unit": "G"
}, {
"Name": "/mnt/e",
"FreeSpace": "245.91",
"Used": "47.06",
"Size": "292.97",
"Percent": "83.94",
"Unit": "G"
}, {
"Name": "/mnt/f",
"FreeSpace": "58.37",
"Used": "234.60",
"Size": "292.97",
"Percent": "19.92",
"Unit": "G"
}, {
"Name": "/mnt/g",
"FreeSpace": "260.61",
"Used": "84.83",
"Size": "345.45",
"Percent": "75.44",
"Unit": "G"
}]
[{
"Name": "/run/lock",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}]
Get Store Specified disk or path
const easydisk = require('easydisk')
console.log(easydisk.getDiskStore("C"));
console.log(easydisk.getDiskStore("/mnt/g"));
result windows
[{
"Name": "C:",
"FreeSpace": "17.61",
"Used": "61.32",
"Size": "78.93",
"Percent": "22.31",
"Unit": "G"
}]
result linux
[{
"Name": "/mnt/g",
"FreeSpace": "260.61",
"Used": "84.83",
"Size": "345.45",
"Percent": "75.44",
"Unit": "G"
}]