This package provides Comparators for the file system, i.e. for SplFileInfo objects. They can be used with the sorting and comparing tools in the Comparable package.
The package requires PHP 5.4 or later and the Comparable package in version 1.0 or later.
$ composer require sgh/comparable-filesystem
The following comparators are available:
You can use all the methods in
\SGH\Comparable\SetFunctions with the comparators.
If you prefer, you can also use the factory method
::callback() to retrieve a comparison callback, that can be used
in any function that expects a user defined comparison callback:
Please see CONTRIBUTING for details.
If you discover any security related issues, please email email@example.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.