71 lines
2.5 KiB
C#
71 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.ServiceUtils.Paths
|
|
{
|
|
public static class ServerFilePaths
|
|
{
|
|
// UpdateRootPath
|
|
// L specialTenant
|
|
// L tenant#1
|
|
// L exampleData#1
|
|
// L version
|
|
// L 1.0.0.0
|
|
// L _default
|
|
// L exampleData#2
|
|
// L tenant#1
|
|
// L exampleData#3
|
|
// L 1.0.0.1
|
|
// L _default
|
|
// L exampleData#4
|
|
// L tenant#1
|
|
// L exampleData#5
|
|
// L version.config
|
|
|
|
private static string _DownloadVersionFilePath;
|
|
private static string _DownloadFolderPath;
|
|
|
|
public static string DownloadVersionFilePath
|
|
{
|
|
get {
|
|
if(_DownloadVersionFilePath is null)
|
|
_DownloadVersionFilePath = ConfigurationManager.AppSettings.Get("DownloadVersionFilePath");
|
|
|
|
return _DownloadVersionFilePath;
|
|
}
|
|
}
|
|
|
|
public static string DownloadFolderPath
|
|
{
|
|
get
|
|
{
|
|
if (_DownloadFolderPath is null)
|
|
_DownloadFolderPath = ConfigurationManager.AppSettings.Get("DownloadFolderPath");
|
|
|
|
return _DownloadFolderPath;
|
|
}
|
|
}
|
|
|
|
static ServerFilePaths()
|
|
{
|
|
|
|
}
|
|
|
|
public static string GetSpecialTenantFolderPath() => Path.Combine(DownloadFolderPath, "overridetenant");
|
|
public static string GetOverrideTenantFolderPath(string tenant) => Path.Combine(GetSpecialTenantFolderPath(), tenant);
|
|
public static string GetVersionFolderPath() => Path.Combine(DownloadFolderPath, "version");
|
|
|
|
public static string GetVersionFolderPath(string version) => Path.Combine(GetVersionFolderPath(), version);
|
|
public static string GetVersionTenantFolderPath(string version, string tenant) => Path.Combine(GetVersionFolderPath(version), tenant);
|
|
public static string GetVersionDefaultFolderPath(string version) => GetVersionTenantFolderPath(version, "default");
|
|
|
|
public static string GetVersionConfigFilePath() => DownloadVersionFilePath;
|
|
//ConfigurationManager.AppSettings.Get("UpdateRootPath");
|
|
}
|
|
}
|