TryCreate() public static method

Takes a full path to a reparse point and finds the target.
public static TryCreate ( string path, ReparsePoint &link ) : bool
path string Full path of the reparse point
link ReparsePoint
return bool
示例#1
0
        /// <summary>
        /// Return true if the path points to a junction. These are distinct
        /// from symlinks.
        /// </summary>
        /// <returns></returns>
        public bool IsJunction()
        {
            ReparsePoint rep;

            return(ReparsePoint.TryCreate(PurePath.ToString(), out rep) &&
                   rep.Tag == ReparsePoint.TagType.JunctionPoint);
        }
示例#2
0
        /// <inheritdoc/>
        public override bool IsSymlink()
        {
            ReparsePoint rep;

            return(ReparsePoint.TryCreate(PurePath.ToString(), out rep) &&
                   rep.Tag == ReparsePoint.TagType.SymbolicLink);
        }