protected function filterPaths(array $paths, $pattern, array $extensions=[])
    {
        if (!$this->isFilterPattern($pattern) && !$extensions) {
            return $paths;
        }
        return array_filter($paths, function ($path) use ($pattern, $extensions) {
            return $this->filterPath($path, $pattern, $extensions);
        });
    }
protected function filterPaths(array $paths, $pattern, array $extensions=[])
    {
        if (!$this->isFilterPattern($pattern) && !$extensions) {
            return $paths;
        }
        return array_filter($paths, function ($path) use ($pattern, $extensions) {
            return $this->filterPath($path, $pattern, $extensions);
        });
    }
protected function filterPaths ( array $ paths , $ pattern , array $ extensions = [ ] ) { if ( ! $ this -> isFilterPattern ( $ pattern ) && ! $ extensions ) { return $ paths ; } return array_filter ( $ paths , function ( $ path ) use ( $ pattern , $ extensions ) { return $ this -> filterPath ( $ path , $ pattern , $ extensions ) ; } ) ; }
Filter out file names by pattern and extensions.

@param array  $paths
@param string $pattern
@param array  $extensions

@return array
Filter out file names by pattern and extensions .