Wrapper for retrieving information about disks with native PHP functions

v1.0.0 2018-12-23 13:15 UTC

README

Wrapper for retrieving information about disks with native PHP functions

Installation

composer require operating-system/disk

Usage

Instantiate disk:

use OperatingSystem\Disk\Disk;

$disk = new Disk(__FILE__);

Get memory information:

$disk->getSize()->format('GB', 1);       // '975.5GB'
$disk->getFreeSize()->format('GB', 2);   // '424.12GB'
$disk->getUsedSize()->format('GB', 2);   // '551.41GB'

Testing

$ ./vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.