src/core/framework/core/3rdparty/dwoo/Dwoo/Template/String.php
protected function makeDirectory($path, $baseDir = null)
	{
		if (is_dir($path) === true) {
			return;
		}

		if ($this->chmod === null) {
			$chmod = 0777;
		} else {
			$chmod = $this->chmod;
		}
		mkdir($path, $chmod, true);

		// enforce the correct mode for all directories created
		if (strpos(PHP_OS, 'WIN') !== 0 && $baseDir !== null) {
			$path = strtr(str_replace($baseDir, '', $path), '\\', '/');
			$folders = explode('/', trim($path, '/'));
			foreach ($folders as $folder) {
				$baseDir .= $folder . DIRECTORY_SEPARATOR;
				chmod($baseDir, $chmod);
			}
		}
	}
protected function makeDirectory($path, $baseDir = null)
	{
		if (is_dir($path) === true) {
			return;
		}

		if ($this->chmod === null) {
			$chmod = 0777;
		} else {
			$chmod = $this->chmod;
		}
		mkdir($path, $chmod, true);

		// enforce the correct mode for all directories created
		if (strpos(PHP_OS, 'WIN') !== 0 && $baseDir !== null) {
			$path = strtr(str_replace($baseDir, '', $path), '\\', '/');
			$folders = explode('/', trim($path, '/'));
			foreach ($folders as $folder) {
				$baseDir .= $folder . DIRECTORY_SEPARATOR;
				chmod($baseDir, $chmod);
			}
		}
	}
protected function makeDirectory ( $ path , $ baseDir = null ) { if ( is_dir ( $ path ) === true ) { return ; } if ( $ this -> chmod === null ) { $ chmod = 0777 ; } else { $ chmod = $ this -> chmod ; } mkdir ( $ path , $ chmod , true ) ; // enforce the correct mode for all directories created if ( strpos ( PHP_OS , 'WIN' ) !== 0 && $ baseDir !== null ) { $ path = strtr ( str_replace ( $ baseDir , '' , $ path ) , '\\' , '/' ) ; $ folders = explode ( '/' , trim ( $ path , '/' ) ) ; foreach ( $ folders as $ folder ) { $ baseDir .= $ folder . DIRECTORY_SEPARATOR ; chmod ( $ baseDir , $ chmod ) ; } } }
ensures the given path exists

@param string $path any path
@param string $baseDir the base directory where the directory is created
($path must still contain the full path, $baseDir
is only used for unix permissions)
ensures the given path exists