public function S3fsStreamWrapper::unlink in S3 File System 7.3
Same name and namespace in other branches
- 7 S3fsStreamWrapper.inc \S3fsStreamWrapper::unlink()
- 7.2 S3fsStreamWrapper.inc \S3fsStreamWrapper::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 StreamWrapperInterface::unlink
See also
http://php.net/manual/en/streamwrapper.unlink.php
1 call to S3fsStreamWrapper::unlink()
- S3fsStreamWrapper::getExternalUrl in ./
S3fsStreamWrapper.inc - Returns a web accessible URL for the resource.
File
- ./
S3fsStreamWrapper.inc, line 724 - Drupal stream wrapper implementation for S3 File System.
Class
- S3fsStreamWrapper
- The stream wrapper class.
Code
public function unlink($uri) {
$this
->setUri($uri);
$converted = $this
->convertUriToKeyedPath($uri);
if (parent::unlink($converted)) {
$this
->_delete_cache($uri);
clearstatcache(TRUE, $uri);
return TRUE;
}
else {
return FALSE;
}
}