You are here

public function LocalStream::rmdir in System stream wrapper 8

Support for rmdir().

Parameters

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

int $options: A bit mask of STREAM_REPORT_ERRORS.

Return value

bool TRUE if directory was successfully removed.

Overrides PhpStreamWrapperInterface::rmdir

See also

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

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

File

src/StreamWrapper/LocalStream.php, line 385

Class

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

Namespace

Drupal\system_stream_wrapper\StreamWrapper

Code

public function rmdir($uri, $options) {
  $this->uri = $uri;
  if ($options & STREAM_REPORT_ERRORS) {
    return \Drupal::service('file_system')
      ->rmdir($this
      ->getLocalPath());
  }
  else {
    return \Drupal::service('file_system')
      ->rmdir($this
      ->getLocalPath());
  }
}