public function LocalStream::rmdir

public LocalStream::rmdir($uri, $options)

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

File

core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 471

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());
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StreamWrapper!LocalStream.php/function/LocalStream::rmdir/8.1.x