private function patternHasMatch($globPattern)
    {
        if (substr(trim($globPattern), 0, 1) === '/') {
            $globPattern = trim(substr($globPattern, 1));
        } elseif (substr(trim($globPattern), -1) === '/') {
            $globPattern = trim(substr($globPattern, 0, -1));
        } else {
            $globPattern = '{' . trim($globPattern) . '}*';
        }

        $initialWorkingDirectory = (string) getcwd();
        chdir($this->directory);

        $matches = glob($globPattern, GLOB_BRACE);

        chdir($initialWorkingDirectory);

        return is_array($matches) && count($matches) > 0;
    }