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);
        });
    }