cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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:Ā 

Re: How to ignore folders during recursive listing

How to ignore folders during recursive listing

rk90
Helpful | Level 5

When I operate on a Dropbox Business account and list each member's personal folders, I end up listing the same shared folders multiple times. That is, if a shared folder is mounted within each member's personal folders, then when I list members' folders I end up listing that shared folder also.

I can filter out the listed shared folder if I don't use  'recursive=True', that is, I can iterate over each sub-folder and check if it's a shared folder and whether or not it was listed before, but then the disadavtage is I will have to recure through each folder manually. How can I list folders recursively and ignore certain sub-folders from getting listed on subsequent `list_folder/continue`.

 

 

1 Reply 1

Greg-DB
Dropbox Staff

There isn't a way to ask the API to ignore specific folders, but it sounds like this question is similar to this previous one of yours. As there, the closest thing is the 'include_mounted_folders' option on /2/files/list_folder. (You set the option when calling /2/files/list_folder, and the behavior will follow through to /2/files/list_folder/continue based on the resulting cursors.)

Otherwise, you'd need to filter out the entries client-side, based on sharing_info.parent_shared_folder_id or sharing_info.shared_folder_id values that you've seen before. (The shared folder IDs are consistent across users.)

Need more support?