fsSize() available fixed windows and typescript typings

This commit is contained in:
Sebastian Hildebrandt
2021-01-29 15:09:28 +01:00
parent 486b959c1e
commit 284ec8cb8f
7 changed files with 31 additions and 12 deletions
+7 -6
View File
@@ -128,12 +128,13 @@ function fsSize(callback) {
if (line !== '') {
line = line.trim().split(/\s\s+/);
data.push({
'fs': line[0],
'type': line[1],
'size': parseInt(line[3]),
'used': parseInt(line[3]) - parseInt(line[2]),
'use': parseFloat((100.0 * (parseInt(line[3]) - parseInt(line[2]))) / parseInt(line[3])),
'mount': line[0]
fs: line[0],
type: line[1],
size: parseInt(line[3], 10),
used: parseInt(line[3], 10) - parseInt(line[2], 10),
available: parseInt(line[2], 10),
use: parseFloat((100.0 * (parseInt(line[3]) - parseInt(line[2]))) / parseInt(line[3])),
mount: line[0]
});
}
});
+1
View File
@@ -368,6 +368,7 @@ export namespace Systeminformation {
type: string;
size: number;
used: number;
available: number;
use: number;
mount: string;
}