mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
f7e354c4f1
(bugSCAPE bug 1011), r=ssu
23 lines
614 B
Perl
23 lines
614 B
Perl
// this function verifies disk space in kilobytes
|
|
function verifyDiskSpace(dirPath, spaceRequired)
|
|
{
|
|
var spaceAvailable;
|
|
|
|
// Get the available disk space on the given path
|
|
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
|
|
|
// Convert the available disk space into kilobytes
|
|
spaceAvailable = parseInt(spaceAvailable / 1024);
|
|
|
|
// do the verification
|
|
if(spaceAvailable < spaceRequired)
|
|
{
|
|
logComment("Insufficient disk space: " + dirPath);
|
|
logComment(" required : " + spaceRequired + " K");
|
|
logComment(" available: " + spaceAvailable + " K");
|
|
return(false);
|
|
}
|
|
|
|
return(true);
|
|
}
|