Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #106 has function does not return true for directories #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fixes #106 has function does not return true for directories #107

wants to merge 2 commits into from

Conversation

MordiSacks
Copy link

No description provided.

@drionix
Copy link

drionix commented Jan 26, 2020

Could also use this, since gcs interpret path name ending with slash ('/') as a directory.

public function has($path)
    {
        if ($this->getObject($path.'/')->exists()){
            return true;
	}
	return $this->getObject($path)->exists();
    }

Basically, this code check if the given path is a directory, if not, check if it is a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants