public static void CopyFileOrDirectoryFollowSymlinks(string source, string dest) { FileUtil.CheckForValidSourceAndDestinationArgumentsAndRaiseAnExceptionWhenNullOrEmpty(source, dest); if (FileUtil.PathExists(dest)) { throw new IOException(string.Format("Failed to Copy File / Directory from '{0}' to '{1}': destination path already exists.", source, dest)); } if (!FileUtil.CopyFileOrDirectoryFollowSymlinksInternal(source, dest)) { throw new IOException(string.Format("Failed to Copy File / Directory from '{0}' to '{1}'.", source, dest)); } }