Skip to content

v1.1.0

Compare
Choose a tag to compare
@Awilum Awilum released this 05 Dec 12:59
  • add ability to extend Filesystem class with Macros.

    use Atomastic\Filesystem\Filesystem;
    use Atomastic\Macroable\Macroable;
    
    Filesystem::macro('countFiles', function($path) {
        return count(iterator_to_array($this->find()->in($path)->files(), false));
    });
    
    $filesytem = new Filesystem();
    
    echo $filesytem->countFiles('/directory');
  • improve tests for directory create() method.