public static function createDirectory($directoryToCreate, $mode = 0775, $recursive = false)
    {

        // we don't have a directory to change the user/group permissions for
        if (is_dir($directoryToCreate) === false) {
            // create the directory if necessary
            if (mkdir($directoryToCreate, $mode, $recursive) === false) {
                throw new \Exception(sprintf('Directory %s can\'t be created', $directoryToCreate));
            }
        }
    }
public static function createDirectory($directoryToCreate, $mode = 0775, $recursive = false)
    {

        // we don't have a directory to change the user/group permissions for
        if (is_dir($directoryToCreate) === false) {
            // create the directory if necessary
            if (mkdir($directoryToCreate, $mode, $recursive) === false) {
                throw new \Exception(sprintf('Directory %s can\'t be created', $directoryToCreate));
            }
        }
    }
public static function createDirectory ( $ directoryToCreate , $ mode = 0775 , $ recursive = false ) { // we don't have a directory to change the user/group permissions for if ( is_dir ( $ directoryToCreate ) === false ) { // create the directory if necessary if ( mkdir ( $ directoryToCreate , $ mode , $ recursive ) === false ) { throw new \ Exception ( sprintf ( 'Directory %s can\'t be created' , $ directoryToCreate ) ) ; } } }
Creates the passed directory.

@param string  $directoryToCreate The directory that should be created
@param integer $mode              The mode to create the directory with
@param boolean $recursive         TRUE if the directory has to be created recursively, else FALSE

@return void
@throws \Exception Is thrown if the directory can't be created
Creates the passed directory .