public static function createDirectoryIfNotExist($path, $replace = false) { if (file_exists($path) && $replace) { rmdir($path); } if (!file_exists($path)) { mkdir($path, 0755, true); } }
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'); } }