IsSymlink() public static méthode

public static IsSymlink ( string path ) : bool
path string
Résultat bool
Exemple #1
0
 public static bool ExistsForFile(string fullpath, string hintpath = null)
 {
     if (SvnIntegration.AppliesToFile(fullpath, hintpath))
     {
         return(SvnIntegration.IsSymlink(fullpath));
     }
     return(false);
 }
Exemple #2
0
        public static bool Exists(FileSystemInfo info, string hintpath = null)
        {
            if (SvnIntegration.AppliesTo(info, hintpath))
            {
                return(SvnIntegration.IsSymlink(info.FullName));
            }

            if (info.Exists)
            {
                return((info.Attributes & FileAttributes.ReparsePoint) != 0);
            }
            return(false);
        }
Exemple #3
0
        public static bool Exists(string path)
        {
            if (SvnIntegration.AppliesTo(path))
            {
                return(SvnIntegration.IsSymlink(path));
            }

            path = path.EndsWith("/") ? path.Remove(path.Length - 1) : path;
            FileInfo file = new FileInfo(path);

            if (file.Exists)
            {
                return((file.Attributes & FileAttributes.ReparsePoint) != 0);
            }
            DirectoryInfo dir = new DirectoryInfo(path);

            return(dir.Exists && ((dir.Attributes & FileAttributes.ReparsePoint) != 0));
        }