function PhpStreamWrapperInterface::unlink
Same name in other branches
- 9 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::unlink()
- 8.9.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::unlink()
- 11.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::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.
See also
unlink()
PhpStreamWrapperInterface::rmdir()
http://php.net/manual/en/streamwrapper.unlink.php
2 methods override PhpStreamWrapperInterface::unlink()
- LocalStream::unlink in core/
lib/ Drupal/ Core/ StreamWrapper/ LocalStream.php - Delete a file.
- ReadOnlyStream::unlink in core/
lib/ Drupal/ Core/ StreamWrapper/ ReadOnlyStream.php - Support for unlink().
File
-
core/
lib/ Drupal/ Core/ StreamWrapper/ PhpStreamWrapperInterface.php, line 494
Class
- PhpStreamWrapperInterface
- Defines a generic PHP stream wrapper interface.
Namespace
Drupal\Core\StreamWrapperCode
public function unlink($path);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.