public function findRecursive($pattern = '.*', $sort = false)
    {
        if (!$this->pwd()) {
            return [];
        }
        $startsOn = $this->path;
        $out = $this->_findRecursive($pattern, $sort);
        $this->cd($startsOn);

        return $out;
    }
public function findRecursive($pattern = '.*', $sort = false)
    {
        if (!$this->pwd()) {
            return [];
        }
        $startsOn = $this->path;
        $out = $this->_findRecursive($pattern, $sort);
        $this->cd($startsOn);

        return $out;
    }
public function findRecursive ( $ pattern = '.*' , $ sort = false ) { if ( ! $ this -> pwd ( ) ) { return [ ] ; } $ startsOn = $ this -> path ; $ out = $ this -> _findRecursive ( $ pattern , $ sort ) ; $ this -> cd ( $ startsOn ) ; return $ out ; }
Returns an array of all matching files in and below current directory.

@param string $pattern Preg_match pattern (Defaults to: .*)
@param bool $sort Whether results should be sorted.
@return array Files matching $pattern
Returns an array of all matching files in and below current directory .