You are here

public function DrupalLocalStreamWrapper::rmdir in Drupal 7

Support for rmdir().

Parameters

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

$options: A bit mask of STREAM_REPORT_ERRORS.

Return value

TRUE if directory was successfully removed.

Overrides StreamWrapperInterface::rmdir

See also

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

File

includes/stream_wrappers.inc, line 807
Drupal stream wrapper interface.

Class

DrupalLocalStreamWrapper
Drupal stream wrapper base class for local files.

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