framework/console/CConsoleCommand.php
public function ensureDirectory($directory)
	{
		if(!is_dir($directory))
		{
			$this->ensureDirectory(dirname($directory));
			echo "      mkdir ".strtr($directory,'\\','/')."\n";
			mkdir($directory);
		}
	}
public function ensureDirectory($directory)
	{
		if(!is_dir($directory))
		{
			$this->ensureDirectory(dirname($directory));
			echo "      mkdir ".strtr($directory,'\\','/')."\n";
			mkdir($directory);
		}
	}
public function ensureDirectory ( $ directory ) { if ( ! is_dir ( $ directory ) ) { $ this -> ensureDirectory ( dirname ( $ directory ) ) ; echo "      mkdir " . strtr ( $ directory , '\\' , '/' ) . "\n" ; mkdir ( $ directory ) ; } }
Creates all parent directories if they do not exist.
@param string $directory the directory to be checked
Creates all parent directories if they do not exist .