How to get the list of files from perforce in groovy using P4Java

107 Views Asked by At

I am trying to get the list of files from a certain folder in Groovy and the Filelist which is returned is null The code which I am trying is:

//I am able to get a successful connection

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

I have tried multiple ways of specifying the path but nothing seems to work, can someone help me on this

0

There are 0 best solutions below