public function filter(\Closure $predicate) {
        $filter = array();
        $filter[0] = function(FixedFDirectory $obj) use ($predicate, &$filter) {
            return $obj
                ->filter($predicate)
                ->map(function(FSObject $obj) use ($predicate, &$filter) {
                    if ($obj->isFile()) {
                        return $obj;
                    }
                    return $filter[0]($obj);
                });
        };
        return new Recursor($filter[0]($this->directory));
    }
public function filter(\Closure $predicate) {
        $filter = array();
        $filter[0] = function(FixedFDirectory $obj) use ($predicate, &$filter) {
            return $obj
                ->filter($predicate)
                ->map(function(FSObject $obj) use ($predicate, &$filter) {
                    if ($obj->isFile()) {
                        return $obj;
                    }
                    return $filter[0]($obj);
                });
        };
        return new Recursor($filter[0]($this->directory));
    }
public function filter ( \ Closure $ predicate ) { $ filter = array ( ) ; $ filter [ 0 ] = function ( FixedFDirectory $ obj ) use ( $ predicate , & $ filter ) { return $ obj -> filter ( $ predicate ) -> map ( function ( FSObject $ obj ) use ( $ predicate , & $ filter ) { if ( $ obj -> isFile ( ) ) { return $ obj ; } return $ filter [ 0 ] ( $ obj ) ; } ) ; } ; return new Recursor ( $ filter [ 0 ] ( $ this -> directory ) ) ; }
Get a recursor that folds all files in this recursor that match the
provided predicate and the objects below that match the predicate as
well.

Won't recurse over directories that do not match the predicate!

@param  \Closure             $predicate  (FSObject -> Bool)
@return Recursor
Get a recursor that folds all files in this recursor that match the provided predicate and the objects below that match the predicate as well .