/// <summary> /// 将一个文件夹复制到特定版本的包文件夹中,然后让当前版本联接到此文件夹中。 /// </summary> /// <param name="sourceDirectory">要复制的文件夹。</param> /// <param name="version">复制文件夹需要复制到此版本号对应的包文件夹中。</param> public void CopyAsCurrent(DirectoryInfo sourceDirectory, string version) { var targetDirectory = GetVersionDirectory(version, false); var currentDirectory = GetVersionDirectory(CurrentDirectoryName, false); PackageDirectory.Copy(sourceDirectory, targetDirectory, DirectoryOverwriteStrategy.Overwrite); PackageDirectory.Link(currentDirectory, targetDirectory); }
/// <summary> /// 将一个文件夹复制到特定版本的包文件夹中,然后让当前版本联接到此文件夹中。 /// </summary> /// <param name="sourceDirectory">要复制的文件夹。</param> /// <param name="version">复制文件夹需要复制到此版本号对应的包文件夹中。</param> public void CopyAsCurrent(DirectoryInfo sourceDirectory, string version) { var targetDirectory = GetVersionDirectory(version, false); var currentDirectory = GetVersionDirectory(CurrentDirectoryName, false); PackageDirectory.Copy(sourceDirectory, targetDirectory); PackageDirectory.LinkOrMirror(currentDirectory, targetDirectory); }
/// <summary> /// 将一个文件夹复制到特定版本的包文件夹中。 /// </summary> /// <param name="sourceDirectory">要复制的文件夹。</param> /// <param name="version">复制文件夹需要复制到此版本号对应的包文件夹中。</param> public void Copy(DirectoryInfo sourceDirectory, string version) { var targetDirectory = GetVersionDirectory(version, false); PackageDirectory.Copy(sourceDirectory, targetDirectory, DirectoryOverwriteStrategy.Overwrite); }