public static string MakeRelativeTo( this ZlpFileInfo pathToMakeRelative, ZlpDirectoryInfo pathToWhichToMakeRelativeTo) { return(ZlpPathHelper.GetRelativePath(pathToWhichToMakeRelativeTo.FullName, pathToMakeRelative.FullName)); }
public ZlpDirectoryInfo GetFullPath() { return(new ZlpDirectoryInfo(ZlpPathHelper.GetFullPath(FullName))); }
public static ZlpFileInfo ChangeExtension( this ZlpFileInfo o, string extension) { return(new ZlpFileInfo(ZlpPathHelper.ChangeExtension(o.FullName, extension))); }
public static ZlpFileInfo GetTemp() => new ZlpFileInfo(ZlpPathHelper.GetTempFilePath());
public static ZlpDirectoryInfo GetTemp() { return(new ZlpDirectoryInfo(ZlpPathHelper.GetTempDirectoryPath())); }
/// <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)); }
public static bool IsSame(this ZlpDirectoryInfo folder1, string folder2) { return(ZlpPathHelper.AreSameFolders(folder1.FullName, folder2)); }
public ZlpFileInfo GetFullPath() { return(new ZlpFileInfo(ZlpPathHelper.GetFullPath(FullName))); }
public static string MakeAbsoluteTo( this ZlpFileInfo pathToMakeAbsolute, string basePathToWhichToMakeAbsoluteTo) { return(ZlpPathHelper.GetAbsolutePath(pathToMakeAbsolute.FullName, basePathToWhichToMakeAbsoluteTo)); }
public static string MakeAbsoluteTo( this string pathToMakeAbsolute, ZlpDirectoryInfo basePathToWhichToMakeAbsoluteTo) { return(ZlpPathHelper.GetAbsolutePath(pathToMakeAbsolute, basePathToWhichToMakeAbsoluteTo.FullName)); }