如何使用Java从groovy中的perforce获取文件列表

如何使用Java从groovy中的perforce获取文件列表,groovy,p4java,Groovy,P4java,我试图从Groovy中的某个文件夹获取文件列表,返回的文件列表为空 我正在尝试的代码是: //我能够获得成功的连接 def p4Server = getp4connection() def filePath = "//path/..." final List<IFileSpec> checkSpecList = FileSpecBuilder.makeFileSpecList(filePath) println "checkSpecLis

我试图从Groovy中的某个文件夹获取文件列表,返回的文件列表为空 我正在尝试的代码是:

//我能够获得成功的连接

def p4Server = getp4connection()
    def filePath = "//path/..."
    final List<IFileSpec> checkSpecList = 
          FileSpecBuilder.makeFileSpecList(filePath)
    println "checkSpecList:" + checkSpecList

    List<IFileSpec> fileList = p4Server.getDepotFiles(
        FileSpecBuilder.makeFileSpecList(filePath), null);

    //here the fileList is coming as null        
    println "fileList:" + fileList
def p4Server=getp4connection()
def filePath=“//路径/…”
最终列表检查规格列表=
FileSpecBuilder.makeFileSpecList(文件路径)
println“checkSpecList:+checkSpecList
List fileList=p4Server.getDepotFiles(
FileSpecBuilder.makeFileSpecList(filePath),null);
//这里的文件列表是空的
println“文件列表:”+文件列表
我尝试了多种指定路径的方法,但似乎都不起作用,有人能帮我吗