我使用以下代码签出文件,但很少用。它适用于特定文件,但对某些文件不起作用。
我的代码是
oSettings.DefaultAcquisitionOption = VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Checkout | VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Download;
oSettings.LocalPath = fldrpathco;
oSettings.AddEntityToAcquire(oFileIteration);
connection.FileManager.AcquireFiles(oSettings);
string p = oSettings.LocalPath.ToString() + oFileIteration.ToString();
我的要求是在工作文件夹中下载dwg文件。谁能告诉我代码中可能出现的问题?
答案 0 :(得分:2)
参考代码:
private static void downloadFile (VDF.Vault.Currency.Connections.Connection connection,
VDF.Vault.Currency.Entities.FileIteration file, string folderPath)
{
var settings = new VDF.Vault.Settings.AcquireFilesSettings(connection);
settings.AddEntityToAcquire(file);
settings.DefaultAcquisitionOption = VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Checkout |
VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Download;
settings.LocalPath = new VDF.Currency.FolderPathAbsolute(folderPath);
connection.FileManager.AcquireFiles(settings);
}