Changeset 14 for Common/FileExt.cs
- Timestamp:
- Aug 2, 2022, 11:46:25 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/FileExt.cs
r5 r14 23 23 } else File.WriteAllText(fileName, content); 24 24 } 25 26 public static string GetExactPathName(string pathName) 27 { 28 if (!(File.Exists(pathName) || Directory.Exists(pathName))) 29 return pathName; 30 31 var di = new DirectoryInfo(pathName); 32 33 if (di.Parent != null) 34 { 35 return Path.Combine( 36 GetExactPathName(di.Parent.FullName), 37 di.Parent.GetFileSystemInfos(di.Name)[0].Name); 38 } 39 else 40 { 41 return di.FullName.ToUpper(); 42 } 43 } 25 44 } 26 45 }
Note:
See TracChangeset
for help on using the changeset viewer.