public function isPath($path, $isRegex = false)
    {
        if ($isRegex) {
            return preg_match('#^'.$path.'$#', $this->path) === 1;
        } else {
            return $this->path == $path;
        }
    }