src/Sulu/Bundle/ResourceBundle/DependencyInjection/SuluResourceExtension.php
private function createOrGetFolder($directory, ContainerBuilder $container)
    {
        $filesystem = new Filesystem();

        $directory = $container->getParameterBag()->resolveValue($directory);
        if (!file_exists($directory)) {
            $filesystem->mkdir($directory);
        }

        return $directory;
    }
private function createOrGetFolder($directory, ContainerBuilder $container)
    {
        $filesystem = new Filesystem();

        $directory = $container->getParameterBag()->resolveValue($directory);
        if (!file_exists($directory)) {
            $filesystem->mkdir($directory);
        }

        return $directory;
    }
private function createOrGetFolder ( $ directory , ContainerBuilder $ container ) { $ filesystem = new Filesystem ( ) ; $ directory = $ container -> getParameterBag ( ) -> resolveValue ( $ directory ) ; if ( ! file_exists ( $ directory ) ) { $ filesystem -> mkdir ( $ directory ) ; } return $ directory ; }
Create and return directory.

@param string $directory
@param ContainerBuilder $container

@return string
Create and return directory .