public function S3Adapter::has in Flysystem - S3 8
Same name and namespace in other branches
- 2.0.x src/Flysystem/Adapter/S3Adapter.php \Drupal\flysystem_s3\Flysystem\Adapter\S3Adapter::has()
File
- src/
Flysystem/ Adapter/ S3Adapter.php, line 19
Class
- S3Adapter
- Overrides methods so it works with Drupal.
Namespace
Drupal\flysystem_s3\Flysystem\AdapterCode
public function has($path) {
$location = $this
->applyPathPrefix($path);
if ($this->s3Client
->doesObjectExist($this->bucket, $location, $this->options)) {
return TRUE;
}
if ($this->s3Client
->doesObjectExist($this->bucket, $location . '/') === TRUE) {
return TRUE;
}
else {
return $this
->doesDirectoryExist($location);
}
}