You are here

public function LocalStream::unlink in System stream wrapper 8

Support for unlink().

Parameters

string $uri: A string containing the URI to the resource to delete.

Return value

bool TRUE if resource was successfully deleted.

Overrides PhpStreamWrapperInterface::unlink

See also

http://php.net/manual/streamwrapper.unlink.php

1 method overrides LocalStream::unlink()
LocalReadOnlyStream::unlink in src/StreamWrapper/LocalReadOnlyStream.php
Support for unlink().

File

src/StreamWrapper/LocalStream.php, line 316

Class

LocalStream
Defines a Drupal stream wrapper base class for local files.

Namespace

Drupal\system_stream_wrapper\StreamWrapper

Code

public function unlink($uri) {
  $this->uri = $uri;
  return \Drupal::service('file_system')
    ->unlink($this
    ->getLocalPath());
}