cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We're looking to hear about your experience when using Dropbox in a web browser. What parts of Dropbox feels very slow to you and takes a lot of time to get done? What are you trying to do in the Dropbox web browser when you experience slowness? Tell us right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Reply and help

V1 getDelta() vs. V2 listFolder()

V1 getDelta() vs. V2 listFolder()

Joel T.9
New member | Level 2

The old getDelta() returns everything for an "App Folder", meaning the app folder and all its subfolders.

It appears that the new listFolder/Continue() isn't really equivalent in that way. It seems to list the files and if you want subfolders you need to make another listFolder call to delve deeper. I can figure out if those paths are absolute or relative, but I'm unclear on how to handle the cursors for the subfolders. Can I just keep track of the app folder one, or do I need to track subfolder cursors as well?

2 Replies 2

Re: V1 getDelta() vs. V2 listFolder()

Greg-DB
Dropboxer

The equivalent of v1's getDelta on v2 is listFolder with recursive=true and listFolderContinue. 

Note that both getDelta and listFolder/Continue are paginated, so for both it's possible that the initial call won't contain all of the results. In either case, for a correct implementation you need to save the cursor from the last call and keep calling back (i.e., to getDelta or listFolderContinue) if the previous reply included hasMore=true. You don't need to keep track of multiple cursors. As long as you originally set recursive=true you'll get all entries back.

The documentation for /1/delta and /2/files/list_folder and/2/files/list_folder/continue have more information:

https://www.dropbox.com/developers-v1/core/docs#delta

https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder

https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue

It sounds like you may be using the Java SDK. The Java SDK documentation for listFolder can be found here:

https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/v2/files/DbxUserFilesReq...

Re: V1 getDelta() vs. V2 listFolder()

Joel T.9
New member | Level 2

Correct, I'm using the Java API. The recursive option is sort of "buried" in API, but I'm doing this now:

getClient().files().listFolderBuilder(").withIncludeDeleted(true).withRecursive(true);
e(true);

Thanks for the help.

Who's talking

Top contributors to this post

  • User avatar
    Joel T.9 New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?