I'm trying to get a list of all files in the dropbox by using listFolder and listFolderContinue. However I only get the list of files/folders in the root, but it doesn't go deeper.
This is my code:
DbxRequestConfig config = new DbxRequestConfig("dropbox/java-tutorial", "en_US");
DbxClientV2 client = new DbxClientV2(config, ACCESS_TOKEN);
ListFolderResult result = client.files().listFolder("");
while (true) {
for (Metadata metadata : result.getEntries()) {
System.out.println(metadata.getPathLower());
}
if (!result.getHasMore()) {
break;
}
result = client.files().listFolderContinue(result.getCursor());
}
} catch (DbxException e) {
e.printStackTrace();
}What I'm doing wrong?
Thank you for helping me!!