public function S3fsStream::unlink in S3 File System 8.2
Same name and namespace in other branches
- 8.3 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
1 call to S3fsStream::unlink()
- S3fsStream::rename in src/
StreamWrapper/ S3fsStream.php - Support for rename().
File
- src/
StreamWrapper/ S3fsStream.php, line 827
Class
- S3fsStream
- Defines a Drupal s3fs (s3fs://) stream wrapper class.
Namespace
Drupal\s3fs\StreamWrapperCode
public function unlink($uri) {
$this
->_assert_constructor_called();
$this
->_debug("unlink({$uri}) called.");
try {
$this->s3
->deleteObject($this
->_get_params($uri));
$this
->_delete_cache($uri);
clearstatcache(TRUE, $uri);
} catch (\Exception $e) {
$this
->_debug($e
->getMessage());
return $this
->_trigger_error($e
->getMessage());
}
return TRUE;
}