コード例 #1
0
ファイル: ZipDownloader.cs プロジェクト: larrynPL/OurUmbraco
        /// <summary>
        /// This will ensure that the docs exist, this checks by the existence of the /Documentation/sitemap.js file
        /// </summary>
        public static void EnsureGitHubDocs(bool overwrite = false)
        {
            var rootFolderPath = HttpContext.Current.Server.MapPath(DocumentationFolder);
            var configPath = HttpContext.Current.Server.MapPath(Config);

            //Check if it exists, if it does then exit
            if (overwrite == false && File.Exists(Path.Combine(rootFolderPath, "sitemap.js")))
                return;

            if (Directory.Exists(rootFolderPath) == false)
                Directory.CreateDirectory(rootFolderPath);

            var unzip = new ZipDownloader(rootFolderPath, configPath) { IsProjectDocumentation = true };
            unzip.Run();
        }
コード例 #2
0
        /// <summary>
        /// This will ensure that the docs exist, this checks by the existence of the /Documentation/sitemap.js file
        /// </summary>
        public static void EnsureGitHubDocs(bool overwrite = false)
        {
            var rootFolderPath = HostingEnvironment.MapPath(DocumentationFolder);
            var configPath     = HostingEnvironment.MapPath(Config);

            //Check if it exists, if it does then exit
            if (overwrite == false && File.Exists(Path.Combine(rootFolderPath, "sitemap.js")))
            {
                return;
            }

            if (Directory.Exists(rootFolderPath) == false)
            {
                Directory.CreateDirectory(rootFolderPath);
            }

            var unzip = new ZipDownloader(rootFolderPath, configPath)
            {
                IsProjectDocumentation = true
            };

            unzip.Run();
        }