«human-readable» etiketlenmiş sorular

17
Bayt cinsinden dosya boyutunu insan tarafından okunabilen dizeye dönüştürme
Bayt dosya boyutunu insan tarafından okunabilen dosya boyutuna dönüştürmek için bu işlevi kullanıyorum: function getReadableFileSizeString(fileSizeInBytes) { var i = -1; var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']; do { fileSizeInBytes = fileSizeInBytes / 1024; i++; } while (fileSizeInBytes > 1024); return Math.max(fileSizeInBytes, …
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.