protected function createDirectory($paths)
    {
        if (!is_array($paths)) {
            $paths = array($paths);
        }

        foreach ($paths as $path) {
            if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) {
                // @codeCoverageIgnoreStart
                throw new \RuntimeException(sprintf('Unable to create directory "%s".', $dir));
                // @codeCoverageIgnoreEnd
            }
        }
    }
protected function createDirectory($paths)
    {
        if (!is_array($paths)) {
            $paths = array($paths);
        }

        foreach ($paths as $path) {
            if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) {
                // @codeCoverageIgnoreStart
                throw new \RuntimeException(sprintf('Unable to create directory "%s".', $dir));
                // @codeCoverageIgnoreEnd
            }
        }
    }
protected function createDirectory ( $ paths ) { if ( ! is_array ( $ paths ) ) { $ paths = array ( $ paths ) ; } foreach ( $ paths as $ path ) { if ( ! is_dir ( $ dir = dirname ( $ path ) ) && false === @ mkdir ( $ dir , 0777 , true ) ) { // @codeCoverageIgnoreStart throw new \ RuntimeException ( sprintf ( 'Unable to create directory "%s".' , $ dir ) ) ; // @codeCoverageIgnoreEnd } } }
Creates the given directory.

@param  array|string $paths An array of directories or a single directory
@return void

@throws \RuntimeException If a directory cannot be created
Creates the given directory .