public function ResourceStreamWrapper::mkdir in D7 Media 6
Support for mkdir().
Parameters
$url: A string containing the url to the directory to create.
$mode: Permission flags - see mkdir().
$options: A bit mask of STREAM_REPORT_ERRORS and STREAM_MKDIR_RECURSIVE.
Return value
TRUE if directory was successfully created.
Overrides StreamWrapperInterface::mkdir
File
- resource/
ResourceStreamWrapper.inc, line 252
Class
- ResourceStreamWrapper
- A base class for Resource Stream Wrappers.
Code
public function mkdir($url, $mode, $options) {
$recursive = (bool) ($options & STREAM_MKDIR_RECURSIVE);
if ($options & STREAM_REPORT_ERRORS) {
return mkdir($this
->interpolateUrl($url), $mode, $recursive);
}
else {
return @mkdir($this
->interpolateUrl($url), $mode, $recursive);
}
}