Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

JoshRobbins's avatar
JoshRobbins
Explorer | Level 3
8 years ago
Solved

Client list files completion handler

Hi, I am successfully listing the contents of a Dropbox folder, however I was wondering whether there is a way to call a completion handler when all the files have been listed?
  • Greg-DB's avatar
    Greg-DB
    8 years ago
    Thanks! In this case, you'd want to run your desired code when the listFolder or listFolderContinue response has hasMore=false. The hasMore value tells you whether or not there are currently any more results to retrieve. If it's false, you know that you've received the entire listing.

    You're already using hasMore to control whether not to call back to listFolderContinue again, so you can expand on that to run some other code when that's done.

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!