Merge branch 'master' of https://github.com/tgpethan/EUS
This commit is contained in:
commit
3c287f0579
1 changed files with 7 additions and 3 deletions
10
EUS.js
10
EUS.js
|
@ -107,11 +107,15 @@ module.exports = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (spaceaa == 1) {
|
if (spaceaa == 1) {
|
||||||
jsonaa["used"] = "";
|
jsonaa["space"] = {};
|
||||||
getSize(__dirname + BASE_PATH + "/i", (err, size) => {
|
getSize(__dirname + BASE_PATH + "/i", (err, size) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
const sizeOfFolder = (size / 1024 / 1024 / 1024).toFixed(2);
|
let sizeOfFolder = (size / 1024 / 1024);
|
||||||
jsonaa["used"] = `${sizeOfFolder} GB`;
|
jsonaa["space"]["mb"] = sizeOfFolder;
|
||||||
|
sizeOfFolder = (size / 1024 / 1024 / 1024);
|
||||||
|
jsonaa["space"]["gb"] = sizeOfFolder;
|
||||||
|
sizeOfFolder = (size / 1024 / 1024 / 1024).toFixed(2);
|
||||||
|
jsonaa["space"]["string"] = `${sizeOfFolder} GB`;
|
||||||
return res.end(JSON.stringify(jsonaa));
|
return res.end(JSON.stringify(jsonaa));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue