Hi,
I'm making a BitBucket plugin using Java and I'm trying to get the names of all files/folders within a repository, starting from the top level. I currently have
ByteArrayOutputStream out = new ByteArrayOutputStream();
contentService.streamFile(repo, branchName, "basic_branching", (s) -> out);
This currently gets what I want from within the basic_branching folder included in the default repository generated when creating a plugin, however I want to get the contents from the level above, the top level of the master branch. I have tried using "" and "/" in place of "basic_branching" but I get an error saying the path needs to be specified. I have also tried req.getContextPath() and repo.getOrigin().toString(). Neither of which were what I wanted. Does anyone know the correct thing to put in here to get the contents from the top level, or is there is another method to do the same thing? Again I am only looking for the file/folder names, not the contents of the files.
Thanks