0

我正在尝试编写一个在 Perforce 中采用路径的方法,例如

//depot/...

并吐出其中的任何子目录

//depot/folderA
//depot/folderB
//depot/folderC

我试过使用,

 public List<IFileSpec> getIFileSpecList(String file) {
    List<IFileSpec> fileList = null;
    try {
        fileList = iServer.getDepotFiles(
                    FileSpecBuilder.makeFileSpecList(new String[] {file}), false);  //Get list of file(s) in path
    }
    catch(Exception e){e.printStackTrace();}
    return fileList;
 }

但在我的情况下,仓库包含太多文件,允许在一个查询中请求这些文件。

所以我的问题是,是否可以使用P4 Java API在 Perforce 的目录中检索子目录

编辑

我正在寻找命令的 Java 等价物p4 dirs //depot/*

4

1 回答 1