示例#1
0
 public static string MakeRelativeTo(
     this ZlpFileInfo pathToMakeRelative,
     ZlpDirectoryInfo pathToWhichToMakeRelativeTo)
 {
     return(ZlpPathHelper.GetRelativePath(pathToWhichToMakeRelativeTo.FullName, pathToMakeRelative.FullName));
 }
示例#2
0
 public ZlpDirectoryInfo GetFullPath()
 {
     return(new ZlpDirectoryInfo(ZlpPathHelper.GetFullPath(FullName)));
 }
示例#3
0
 public static ZlpFileInfo ChangeExtension(
     this ZlpFileInfo o,
     string extension)
 {
     return(new ZlpFileInfo(ZlpPathHelper.ChangeExtension(o.FullName, extension)));
 }
示例#4
0
 public static ZlpFileInfo GetTemp() => new ZlpFileInfo(ZlpPathHelper.GetTempFilePath());
示例#5
0
 public static ZlpDirectoryInfo GetTemp()
 {
     return(new ZlpDirectoryInfo(ZlpPathHelper.GetTempDirectoryPath()));
 }
示例#6
0
 /// <summary>
 /// Retrieves the file name with the extension in a given string.
 /// </summary>
 /// <remarks>
 /// Examples:
 /// "C:\Team\Text\Test.Txt" would return "Test.Txt".
 /// "C:\Team\Text\Test" would return "Test".
 /// </remarks>
 public static string GetNameWithExtension(
     string path)
 {
     return(string.IsNullOrEmpty(path) ? path : ZlpPathHelper.GetFileNameFromFilePath(path));
 }
示例#7
0
 public static bool IsSame(this ZlpDirectoryInfo folder1, string folder2)
 {
     return(ZlpPathHelper.AreSameFolders(folder1.FullName, folder2));
 }
示例#8
0
 public ZlpFileInfo GetFullPath()
 {
     return(new ZlpFileInfo(ZlpPathHelper.GetFullPath(FullName)));
 }
 public static string MakeAbsoluteTo(
     this ZlpFileInfo pathToMakeAbsolute,
     string basePathToWhichToMakeAbsoluteTo)
 {
     return(ZlpPathHelper.GetAbsolutePath(pathToMakeAbsolute.FullName, basePathToWhichToMakeAbsoluteTo));
 }
示例#10
0
 public static string MakeAbsoluteTo(
     this string pathToMakeAbsolute,
     ZlpDirectoryInfo basePathToWhichToMakeAbsoluteTo)
 {
     return(ZlpPathHelper.GetAbsolutePath(pathToMakeAbsolute, basePathToWhichToMakeAbsoluteTo.FullName));
 }