Site.getDiskUsage () |
function returns the used disk space for this site in Kilobyte |
Sourcecode in Site/objectFunctions.js:
1: function getDiskUsage() { 2: if (this.diskusage == null) { 3: this.diskusage = 0; 4: for (var i=0; i<this.files.count(); i++) 5: this.diskusage += this.files.get(i).filesize; 6: for (var i=0; i<this.images.count(); i++) { 7: if (this.images.get(i).filesize == null) 8: this.images.get(i).filesize = this.images.get(i).getFile().getLength(); 9: this.diskusage += this.images.get(i).filesize; 10: } 11: } 12: return Math.round(this.diskusage / 1024); 13: } |