GrumPHP\Collection\FilesCollection::paths PHP Method

paths() public method

$collection->paths(['/^spec\/','/^src\/'])
public paths ( array $patterns ) : FilesCollection
$patterns array
return FilesCollection
    public function paths(array $patterns)
    {
        $filter = new Iterator\PathFilterIterator($this->getIterator(), $patterns, []);
        return new FilesCollection(iterator_to_array($filter));
    }