/// <summary> /// Determines whether the specified path exists and refers to a junction point. /// </summary> /// <param name="path">The junction point path</param> /// <returns>True if the specified path represents a junction point</returns> /// <exception cref="IOException">Thrown if the specified path is invalid /// or some other error occurs</exception> public static bool Exists(string path) { if (!Directory.Exists(path)) { return(false); } var target = ReparsePoint.GetTarget(path); return(target != null); }
/// <summary> /// Gets the target of the specified junction point. /// </summary> /// <remarks> /// Only works on NTFS. /// </remarks> /// <param name="junctionPoint">The junction point path</param> /// <returns>The target of the junction point</returns> /// <exception cref="IOException">Thrown when the specified path does not /// exist, is invalid, is not a junction point, or some other error occurs</exception> public static string GetTarget(string junctionPoint) { return(ReparsePoint.GetTarget(junctionPoint)); }
public static string GetTargetPath(string path) { return(ReparsePoint.GetTarget(path)); }