如何以编程方式检测已删除的文件? [英] How to programmatically detect deleted files?

查看:243
本文介绍了如何以编程方式检测已删除的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Team Foundation中,您可以执行以下操作要求Team Explorer显示已删除的文件:

In Team Foundation, you can ask Team Explorer to show deleted files by doing this:


工具>选项>源代码管理>
Visual Team Foundation Server>在源代码管理
Explorer中显示
个删除的项目。

Tools > Options > Source Control > Visual Team Foundation Server > Show deleted items in the Source Control Explorer.

我的问题

我正在开发一个同步工具,因此需要在TFS中检测到已删除的文件。

I am developing a synchronisation tool, and I need to detected deleted files in TFS. Workspace.Get(...) returns only non-deleted files.

有什么想法可以实现吗?

Any idea how I can achieve that?

推荐答案

转到开始菜单中的Visual Studio文件夹,然后从 Visual Studio工具子文件夹中启动Visual Studio命令提示符。

Go to the Visual Studio folder in your start menu and start up a Visual Studio Command Prompt from the "Visual Studio Tools" subfolder.

您要运行的命令是:

tf dir /server:myserver $/myproject /recursive /deleted

(其中myserver和myproject是您的服务器和项目)

(where myserver and myproject are your server and project)

使用 tf help获取常规信息,使用 tfs help dir获取有关此命令的更多帮助,或者在Google上的 tf.exe获取更多信息。

use "tf help" for general info, "tfs help dir" for more help on this command, or google on "tf.exe" for more info.

这篇关于如何以编程方式检测已删除的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆