Example #1
0
 private static void AddLinks(string path, List <Link> list)
 {
     if (Ignore(path))
     {
         return;
     }
     foreach (var dir in Directory.GetDirectories(path))
     {
         if (!Ignore(dir))
         {
             try
             {
                 Link link = JunctionPoint.GetLink(dir);
                 if (link != null)
                 {
                     list.Add(link);
                 }
                 else
                 {
                     AddLinks(dir, list);
                 }
             }
             catch (IOException)
             {
             }
         }
     }
 }
Example #2
0
 public bool CheckLink()
 {
     if (Directory.Exists(source) && Directory.Exists(destination))
     {
         return(Equals(JunctionPoint.GetLink(source)));
     }
     return(false);
 }
Example #3
0
 public void Create()
 {
     try
     {
         if (type == LinkType.Junction)
         {
             JunctionPoint.CreateJunction(source, destination, true);
         }
         else if (type == LinkType.Symbolic)
         {
             JunctionPoint.CreateSymLink(source, destination);
         }
     }
     catch (Exception)
     {
         CreateWithMkLink(source, destination, type);
     }
 }
Example #4
0
 public bool DeleteLink()
 {
     return(JunctionPoint.Delete(source));
 }