private static function pathMatchesRegex($path, $blackList)
    {
        foreach ($blackList as $item) {
            $match = '#' . strtr($item, '#', '\#') . '#';
            if (preg_match($match, $path)) {
                return true;
            }
        }

        return false;
    }