public function S3fsStream::writeUriToCache in S3 File System 8.3
Same name and namespace in other branches
- 8.2 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::writeUriToCache()
- 4.0.x src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::writeUriToCache()
Write the file at the given URI into the metadata cache.
This function is public so that other code can upload files to S3 and then have us write the correct metadata into our cache.
1 call to S3fsStream::writeUriToCache()
- S3fsStream::stream_flush in src/
StreamWrapper/ S3fsStream.php
File
- src/
StreamWrapper/ S3fsStream.php, line 1177
Class
- S3fsStream
- Defines a Drupal s3 (s3://) stream wrapper class.
Namespace
Drupal\s3fs\StreamWrapperCode
public function writeUriToCache($uri) {
if ($this
->waitUntilFileExists($uri)) {
$metadata = $this
->getS3Metadata($uri);
if (!empty($metadata)) {
$this
->writeCache($metadata);
clearstatcache(TRUE, $uri);
}
}
}