protected function ensureDirectoryExists($dir)
    {
        if (! file_exists($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) {
            throw new InvalidConfigurationException(sprintf('Directory "%s" cannot be created!', $dir), 1451862775);
        }
    }
protected function ensureDirectoryExists($dir)
    {
        if (! file_exists($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) {
            throw new InvalidConfigurationException(sprintf('Directory "%s" cannot be created!', $dir), 1451862775);
        }
    }
protected function ensureDirectoryExists ( $ dir ) { if ( ! file_exists ( $ dir ) && ! @ mkdir ( $ dir , 0777 , true ) && ! is_dir ( $ dir ) ) { throw new InvalidConfigurationException ( sprintf ( 'Directory "%s" cannot be created!' , $ dir ) , 1451862775 ) ; } }
Check that the directory exists

@param string $dir

@throws InvalidConfigurationException
Check that the directory exists