flysystem-google-cloud-storage
flysystem-google-cloud-storage copied to clipboard
has function does not return true for directories
the has function
Superbalist\Flysystem\GoogleStorage::has()
Does not return true for directories.
Ok, found a solution
public function has($path)
{
if ($this->getObject($path)->exists()) {
return true;
}
return count(array_filter($this->listContents($path), function ($item) use ($path) {
return $item['path'] === $path;
})) === 1;
}
fixed by #107