workspace.PendAdd() 确切的语法吗?
我无法使用 tfs sdk 添加新文件:
int a = workspace.PendAdd(path,recursive );
这个参数“路径”是什么?文件路径 在哪里添加或从哪里添加?
或者在使用此方法之前必须将新文件复制到此文件夹中?
I am unable to add a new file using tfs sdk:
int a = workspace.PendAdd(path,recursive );
What is this argument "Path"? path of file where to add or from where to add?
or before using this method v have to copy the new file in this folder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您尝试添加文件夹,则该目录必须首先存在。如果您尝试添加文件,该文件必须首先存在。之后,您可以运行,例如:
请记住,如果您实际上正在创建文件夹,则该命令的身份执行需要具有创建文件夹的权限。
因此,要创建一个文件夹,您当然必须添加代码来假设它尚不存在:
If you are trying to add a folder, the directory has to exist first. If you are trying to add a file, the file has to exist first. After that you can run, for example:
Keep in mind that the identity exec this command needs to have permissions to create the folder if in fact you are creating a folder.
So to create a folder though of course you would have to add code to do assuming it doesn't already exist: