function SessionStreamWrapper::rmdir
Same name in other branches
- 8.x-1.x stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::rmdir()
- 4.0.x modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::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/en/streamwrapper.rmdir.php
File
-
modules/
stream_wrapper_example/ src/ StreamWrapper/ SessionStreamWrapper.php, line 711
Class
- SessionStreamWrapper
- Example stream wrapper class to handle session:// streams.
Namespace
Drupal\stream_wrapper_example\StreamWrapperCode
public function rmdir($uri, $options) {
$path = $this->getLocalPath($uri);
if (!$this->sessionHelper
->checkPath($path) or !is_array($this->sessionHelper
->getPath($path))) {
return FALSE;
}
$this->sessionHelper
->clearPath($path);
return TRUE;
}