java - How to get the list of folders from a branch in perforce? -



java - How to get the list of folders from a branch in perforce? -

i'm using perforce api read list of folders in branch in java.

i reached point tells me branch spec.

http://www.perforce.com/perforce/doc.current/manuals/p4java-javadoc/com/perforce/p4java/server/iserver.html#getbranchspec(java.lang.string)

used next code implement getdirectories() method.

string serveruri = "p4java://<server-address>:1666?username=username&password=password"; iserver server = serverfactory.getserver(serveruri, null); server.connect(); list<ifilespec> inputlist = filespecbuilder.makefilespeclist("//domain/code/branches/"); system.out.println("helloperforce.main() >> passed list >> " + inputlist ); list<ifilespec> outputlist = server.getdirectories(inputlist , false, false, false); system.out.println("helloperforce.main() >> directory list >> " + outputlist );

output: outputlist null.

expected output: list of folder names within //domain/code/branches directory.

can please point me missing here?

what want getdirectories(). branch spec mapping between 2 branches (which but not necessarily top-level depot paths). if you're talking single "branch" you're talking depot path, e.g. "//depot/main", rather branch spec. list of folders under "main" branch you'd inquire list of directories matching "//depot/main/*".

java perforce

Comments

Popular posts from this blog

javascript - I need to update the text of a paragraph by inline edit -

javascript - THREE.js reposition vertices for RingGeometry -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -