public function LocalStream::unlink in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/StreamWrapper/LocalStream.php \Drupal\Core\StreamWrapper\LocalStream::unlink()
Delete a file.
This method is called in response to unlink().
Note, in order for the appropriate error message to be returned this method should not be defined if the wrapper does not support removing files.
Note, the streamWrapper::$context property is updated if a valid context is passed to the caller function.
Parameters
string $path: The file URL which should be deleted.
Return value
bool Returns TRUE on success or FALSE on failure.
Overrides PhpStreamWrapperInterface::unlink
See also
unlink()
PhpStreamWrapperInterface::rmdir()
http://php.net/manual/en/streamwrapper.unlink.php
1 method overrides LocalStream::unlink()
- LocalReadOnlyStream::unlink in core/
lib/ Drupal/ Core/ StreamWrapper/ LocalReadOnlyStream.php - Support for unlink().
File
- core/
lib/ Drupal/ Core/ StreamWrapper/ LocalStream.php, line 304
Class
- LocalStream
- Defines a Drupal stream wrapper base class for local files.
Namespace
Drupal\Core\StreamWrapperCode
public function unlink($uri) {
$this->uri = $uri;
return $this
->getFileSystem()
->unlink($this
->getLocalPath());
}