/// <summary> /// 从vss目录获取文件 /// </summary> /// <param name="vssPath">vss文件目录</param> /// <param name="localPath">本地保存目录</param> public void Get(string vssPath, string localPath) { // Create a VSSDatabase object. IVSSDatabase vssDatabase = new VSSDatabase(); // Open a VSS database using network name // for automatic user login. vssDatabase.Open(this.srcSafeIni, this.username, this.password); IVSSItem vssFile = vssDatabase.get_VSSItem(vssPath, false); // Get a file into a specified folder. //string testFile = @"C:\1\test.txt"; vssFile.Get(ref localPath, 0); //// Get a file into a working folder. //localPath = null; //vssFile.Get(ref localPath, 0); Console.WriteLine("The Get operation is completed"); }