xndbogdan/filesize-conversions
最新稳定版本:v1.1
Composer 安装命令:
composer require xndbogdan/filesize-conversions
包简介
Filesize conversions in PHP
README 文档
README
Filesize conversions in PHP
This is a php plugin that lets you convert filesizes. I'm not sure why would anyone need this, but here it is!
Installation
You can install the package via composer:
composer require xndbogdan/filesize-conversions
Usage
FilesizeConversions::fromBytes(pow(1024, 5))->toPetabytes();
You can also use this package to get a real file's size and convert it to anything, like this:
FilesizeConversions::fromFile($yourFilePath)->toKilobytesHuman();
Moreover, you can now do quick conversions
FileSizeConversions::quickConvert('megabytes', 'kilobytes', 15);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 565
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-16