public function S3fsStream::unlink in S3 File System 8.3
Same name and namespace in other branches
- 8.2 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::unlink()
- 4.0.x src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::unlink()
Support for unlink().
Parameters
string $uri: The uri of the resource to delete.
Return value
bool TRUE if resource was successfully deleted, regardless of whether or not the file actually existed. FALSE if the call to S3 failed, in which case the file will not be removed from the cache.
Overrides PhpStreamWrapperInterface::unlink
See also
http://php.net/manual/en/streamwrapper.unlink.php
File
- src/
StreamWrapper/ S3fsStream.php, line 838
Class
- S3fsStream
- Defines a Drupal s3 (s3://) stream wrapper class.
Namespace
Drupal\s3fs\StreamWrapperCode
public function unlink($uri) {
$this
->setUri($uri);
$converted = $this
->convertUriToKeyedPath($uri);
if (parent::unlink($converted)) {
$this
->deleteCache($uri);
clearstatcache(TRUE, $uri);
return TRUE;
}
return FALSE;
}