fsSize() added rw (win, linux, mac OS, BSD)
This commit is contained in:
parent
0038afdd5e
commit
6d5a34b65d
@ -87,7 +87,7 @@ function fsSize(callback) {
|
|||||||
const used = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[3] : line[2])) * 1024;
|
const used = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[3] : line[2])) * 1024;
|
||||||
const available = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[4] : line[3])) * 1024;
|
const available = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[4] : line[3])) * 1024;
|
||||||
const use = parseFloat((100.0 * (used / (used + available))).toFixed(2));
|
const use = parseFloat((100.0 * (used / (used + available))).toFixed(2));
|
||||||
let rw = _darwin && osMounts && Object.keys(osMounts).length > 0 ? osMounts[fs] || false : null;
|
let rw = osMounts && Object.keys(osMounts).length > 0 ? osMounts[fs] || false : null;
|
||||||
line.splice(0, (_linux || _freebsd || _openbsd || _netbsd) ? 6 : 5);
|
line.splice(0, (_linux || _freebsd || _openbsd || _netbsd) ? 6 : 5);
|
||||||
const mount = line.join(' ');
|
const mount = line.join(' ');
|
||||||
if (!data.find(el => (el.fs === fs && el.type === fsType))) {
|
if (!data.find(el => (el.fs === fs && el.type === fsType))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user