| | |
| | | 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) |
| | |
| | | foreach (var fileName in ReadRegionFiles(path)) |
| | | { |
| | | File.Delete(Path.Combine(path, fileName)); |
| | | MainPage.Log("Del region file :" + fileName); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | 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; |
| | | } |
| | |
| | | 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}"); |
| | | } |
| | | } |
| | | |