Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Quas94's avatar
Quas94
Explorer | Level 3
7 years ago

For list_folder, are folders always returned before files?

EDIT:

I've played around a little more and it appears that not all folders are returned before files are returned. Is there any way to achieve this functionality? Or alternatively, is it possible to fetch only folders, and only files?

It appears that items are fetched from the database in order of creation_date, is that correct? If not, what's the order?

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    The Dropbox API /2/files/list_folder[/continue] endpoints do not necessarily return folders before files. There isn't a way to make them return folders first, or folders only, but I'll pass these along as feature requests. I can't promise if or when those might be implemented though. 

    The entries returned by /2/files/list_folder[/continue] are returned in the order needed to retrieve an accurate representation of the state of the Dropbox account, so make sure you process them in the order received, per the /2/files/list_folder documentation.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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!