在 P4V 中,我可以在“Search in:”字段中输入目录,在“Name contains:”字段中输入诸如“*.c”之类的文件模式,然后点击“Find”。
如何在 P4(Windows DOS shell)命令行或使用 P4 API 执行此操作?我想编写一个 C# 程序来做到这一点。
最佳答案
在 shell 中:
p4 files '//.../*.c'
我没有使用过 C# P4 API,但我使用过其他一些 API,它们都有类似的东西:
p4.run( 'files', '//.../*.c' )
“p4 文件”的一个有用变体是“p4 fstat”,它具有各种过滤标志并产生丰富的状态属性。
关于file - Perforce P4 命令行 : How to find files in the repository?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8539405/