Exemple #1
0
        static void UnlinkDirectory(DirectoryInfo directory)
        {
            var link = Symlink.FromPath(directory.FullName);

            if (link.Exists)
            {
                link.Delete();
            }
        }
Exemple #2
0
        static void LinkDirectory(DirectoryInfo directory, string destination)
        {
            var link = Symlink.FromPath(directory.FullName);

            if (link.Exists)
            {
                link.DestinationPath = destination;
            }
            else
            {
                if (directory.Exists)
                {
                    directory.Delete(true);
                }
                link.Create(destination);
            }
        }