You are here

public function PhpStreamWrapperInterface::unlink in Drupal 9

Same name and namespace in other branches
  1. 8 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\StreamWrapper

Code

public function unlink($path);