Gitamin\Services\Git\Repository::pathExists PHP Method

pathExists() public method

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.
return 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;
    }