createDirectoryIfNotExist() public static method

public static createDirectoryIfNotExist ( $path, $replace = false )
 private function createDirectories($viewsPath)
 {
     FileUtil::createDirectoryIfNotExist($viewsPath . 'layouts');
     FileUtil::createDirectoryIfNotExist($viewsPath . 'auth');
     if ($this->laravelVersion == '5.1') {
         FileUtil::createDirectoryIfNotExist($viewsPath . 'emails');
     } else {
         FileUtil::createDirectoryIfNotExist($viewsPath . 'auth/passwords');
         FileUtil::createDirectoryIfNotExist($viewsPath . 'auth/emails');
     }
 }
 private function copyView()
 {
     $viewsPath = config('infyom.laravel_generator.path.views', base_path('resources/views/'));
     $templateType = config('infyom.laravel_generator.path.templates', 'core-templates');
     FileUtil::createDirectoryIfNotExist($viewsPath . 'layouts');
     FileUtil::createDirectoryIfNotExist($viewsPath . 'auth');
     FileUtil::createDirectoryIfNotExist($viewsPath . 'auth/passwords');
     FileUtil::createDirectoryIfNotExist($viewsPath . 'emails');
     $files = ['layouts/app.stub' => "layouts/app.blade.php", 'auth/login.stub' => "auth/login.blade.php", 'auth/register.stub' => "auth/register.blade.php", 'auth/password.stub' => "auth/password.blade.php", 'auth/reset.stub' => "auth/reset.blade.php", 'emails/password.stub' => "emails/password.blade.php"];
     foreach ($files as $stub => $blade) {
         $sourceFile = base_path('vendor/infyom/' . $templateType . "/templates/scaffold/" . $stub);
         $destinationFile = $viewsPath . $blade;
         $this->publishFile($sourceFile, $destinationFile, $blade);
     }
 }