original_string: 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);
  			}
  		}
  	}
code: 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);
  			}
  		}
  	}
code_tokens: 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 ) ; } } }
docstring: 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)
docstring_tokens: ensures the given path exists