Forum Discussion

sergey-sm's avatar
sergey-sm
New member | Level 2
3 years ago
Solved

Dropbox Java SDK - does "listRevisions(String path)" return ordered list of revisions?

Hi, I need to know if the order of returned file versions is guaranteed for this method https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.2.0/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listRevisions(java.lang.String) ? I need to restore the latest previous version of a file if a version id is not provided for our API.

  • The documentation doesn't indicate a specific sort order, so I can't guarantee if/how it will be sorted. I'll ask the team to document/guarantee a particular order, but I can't promise if/when that would be done. That being the case, I recommend applying whatever sorting you need client-side to be sure.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The documentation doesn't indicate a specific sort order, so I can't guarantee if/how it will be sorted. I'll ask the team to document/guarantee a particular order, but I can't promise if/when that would be done. That being the case, I recommend applying whatever sorting you need client-side to be sure.