flysystem-google-cloud-storage
flysystem-google-cloud-storage copied to clipboard
fixes #106 has function does not return true for directories
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.