Wrapper for retrieving information about file times with native PHP functions

v1.0.0 2018-12-16 08:36 UTC

README

Wrapper for retrieving information about file times with native PHP functions

Installation

composer require operating-system/file-time

Usage

Instantiate permission:

use OperatingSystem\FileTime\FileTime;

$fileTime = new FileTime(__FILE__);

Get file time information:

$fileTime->getLastAccessed()->format('d.m.Y H:i:s');    // '16.12.2018 08:00:00'
$fileTime->getLastModified()->format('d.m.Y H:i:s');    // '16.12.2018 08:00:00'
$fileTime->getLastChanged()->format('d.m.Y H:i:s');     // '16.12.2018 08:00:00'

Testing

$ ./vendor/bin/phpunit

License

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