v2.0.1
filesize
人間が読みやすいファイルサイズを取得するためのパッケージ。生のファイルサイズを読みやすい文字列に変換します。
182いいね 3万30日間ダウンロード160Pub ポイント
AndroidiOSWebmacOSWindowsLinux
ファイルサイズを人間らしく表示
^1.16.8^1.0.1^1.11.0以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
pub package Build Status Coverage Status
A micro library that provides an easy way to get human readable file size strings
filesize(1024); // "1 KB"
filesize(664365320); // "633.59 MB"
filesize(4324324232343); // "3.93 TB"
Optional parameter to specify numbers after comma/point:
filesize(664365320, 4); // "633.5881 MB"
filesize(4324324232343, 3); // "3.932 TB"
Inspired by filesize.js