Gitamin\Services\Git\Repository::pathExists PHP Метод

pathExists() публичный Метод

Return true if $path exists in $branch; return false otherwise.
public pathExists ( string $commitish, string $path ) : boolean
$commitish string Commitish reference; branch, tag, SHA1, etc.
$path string Path whose existence we want to verify.
Результат boolean GRIPE Arguably belongs in Gitter, as it's generally useful functionality. Also, this really may not be the best way to do this.
    public function pathExists($commitish, $path)
    {
        $output = $this->getClient()->run($this, "ls-tree {$commitish} '{$path}'");
        if (strlen($output) > 0) {
            return true;
        }
        return false;
    }