Example #1
0
 /// <summary>
 /// Creates symbolic links.
 /// </summary>
 public static void CreateSymbolicLink(string symbolicLinkPath, string targetPath, bool targetIsDirectory = false)
 {
     if (!Direct.CreateSymbolicLinkW(symbolicLinkPath, targetPath,
                                     targetIsDirectory ? SYMBOLIC_LINK_FLAG.SYMBOLIC_LINK_FLAG_DIRECTORY : SYMBOLIC_LINK_FLAG.SYMBOLIC_LINK_FLAG_FILE))
     {
         throw ErrorHelper.GetIoExceptionForLastError(symbolicLinkPath);
     }
 }