function DrupalLocalStreamWrapper::rmdir

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 813

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.