public function getBlacklistFilter()
    {
        $blacklist = $this->getBlacklist();
        $base = '/^'
              . preg_quote($this->getBasePath() . DIRECTORY_SEPARATOR, '/')
              . '/';

        return function (SplFileInfo $file) use ($base, $blacklist) {
            $path = Path::canonical(
                preg_replace($base, '', $file->getPathname())
            );

            if (in_array($path, $blacklist)) {
                return false;
            }

            return null;
        };
    }