문제

I'm using the Perforce .NET APIs P4API.NET library and wonder if there is a "p4 files" command line equivalence that I can call to return a listing of files (such as *.cpp) in my //depot? Thanks in advance!

도움이 되었습니까?

해결책

Here's a code snippet that works for me.

IList<FileSpec> filesToFind = new List<FileSpec>();
FileSpec fileToFind = new FileSpec(new DepotPath("//depot/....cpp"), null, null, VersionSpec.Head);
filesToFind.Add(fileToFind);
IList<FileSpec> filesFound = pRep.GetDepotFiles(filesToFind, null);

다른 팁

A quick tour around the docs doesn't immediately reveal anything, but you could always use P4Command.Run to run any arbitrary Perforce command, so you could still run p4 files //depot/...cpp.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top