protected function createDirectory($directory)
    {
        if (!@mkdir($directory, $this->mode, true) && !is_dir($directory)) {
            throw new \RuntimeException(sprintf('The directory \'%s\' could not be created.', $directory));
        }
    }
protected function createDirectory($directory)
    {
        if (!@mkdir($directory, $this->mode, true) && !is_dir($directory)) {
            throw new \RuntimeException(sprintf('The directory \'%s\' could not be created.', $directory));
        }
    }
protected function createDirectory ( $ directory ) { if ( ! @ mkdir ( $ directory , $ this -> mode , true ) && ! is_dir ( $ directory ) ) { throw new \ RuntimeException ( sprintf ( 'The directory \'%s\' could not be created.' , $ directory ) ) ; } }
Creates the specified directory and its parents.

@param string $directory Path of the directory to create

@throws \InvalidArgumentException if the directory already exists
@throws \RuntimeException         if the directory could not be created
Creates the specified directory and its parents .