public function LocalStream::rmdir

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 drupal/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
Support for rmdir().

File

drupal/core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 464
Definition of Drupal\Core\StreamWrapper\LocalStream.

Class

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

Namespace

Drupal\Core\StreamWrapper

Code

public function rmdir($uri, $options) {
  $this->uri = $uri;
  if ($options & STREAM_REPORT_ERRORS) {
    return drupal_rmdir($this
      ->getLocalPath());
  }
  else {
    return @drupal_rmdir($this
      ->getLocalPath());
  }
}