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) { } } } }
public bool CheckLink() { if (Directory.Exists(source) && Directory.Exists(destination)) { return(Equals(JunctionPoint.GetLink(source))); } return(false); }
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); } }
public bool DeleteLink() { return(JunctionPoint.Delete(source)); }