From 8df24b0a3dfd5b6f39c5393ef24eab25b70ab858 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 九月 2020 13:18:33 +0800
Subject: [PATCH] 202009111
---
HDL_ON/DAL/FileUtils.cs | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/DAL/FileUtils.cs b/HDL_ON/DAL/FileUtils.cs
index 4f114b6..36d64fa 100644
--- a/HDL_ON/DAL/FileUtils.cs
+++ b/HDL_ON/DAL/FileUtils.cs
@@ -16,6 +16,17 @@
public static string RootPath = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/";
/// <summary>
+ /// 鏄惁瀛樺湪鏂囦欢澶�
+ /// </summary>
+ /// <returns></returns>
+ public static bool IsExisFolder(string folderName)
+ {
+ bool result = false;
+ var path = Path.Combine(RootPath, folderName);
+ result = Directory.Exists(path);
+ return result;
+ }
+ /// <summary>
/// 鍒涘缓涓�涓綇瀹呯殑澶囦唤鏂囦欢澶�
/// </summary>
public static string CreateRegionBackup(string regionId)
@@ -45,7 +56,6 @@
foreach (var fileName in ReadRegionFiles(path))
{
File.Delete(Path.Combine(path, fileName));
- MainPage.Log("Del region file :" + fileName);
}
}
@@ -79,7 +89,7 @@
{
continue;
}
- if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "Register_File" || NextFile.Name == "AccountListDB")
+ if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB")
{
continue;
}
@@ -95,7 +105,7 @@
/// <summary>
/// 閬嶅巻鏂囦欢
/// </summary>
- public static List<string> ReadFiles(bool reInit = true)
+ public static List<string> ReadFiles()
{
List<string> listFiles = new List<string>();
DirectoryInfo TheFolder = new DirectoryInfo(RootPath);
@@ -103,14 +113,6 @@
{
listFiles.Add(NextFile.Name);
}
- try
- {
- if (reInit)
- {
- MainPage.LocationFiles = listFiles;
- }
- }
- catch { }
return listFiles;
}
@@ -215,10 +217,9 @@
for (int j = 0; j < filesList.Count; j++)
{
var f = filesList[j];
- if (f == "linphonerc" || f == "AccountListDB" || f == "Register_File")
+ if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File")
continue;
DeleteFile(f);
- MainPage.Log($"Del file :{f}");
}
}
--
Gitblit v1.8.0