You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
dkoshenkov
4 years agoExplorer | Level 4
Why should I remove the entry and all its children for each DeletedMetadata when using list_folder?
Hello everyone,
I am keeping a local cache of the contents of my dropbox account using files/list_folder and files/list_folder/continue. There is a guide in the documentation on the exact steps that I need to perform to achieve that, which is absolutely great.
However, I cannot wrap my head around why for each DeletedMetadata I should delete the entry AND all of its children. I understand why we should delete the entry, but what about the children? Since the entry has been deleted in dropbox, this means that all of its children have also been deleted, which in turn means that every child of the entry will receive its own DeletedMetadata. I do not see the benefits of deleting the children together with the entry.
If I delete only the entry itself whenever I get a DeletedMetadata and not delete its children, will my local cache be in sync with the dropbox contents?
My uneducated guess would be that we need to do this because if we delete the parent without deleting its children, it would be impossible to delete the children, because we can no longer access them. However, this is not an issue in my case. Deleting parentless children is still possible in the database I am using.
Please let me know if I am missing anything. Perhaps, there is another reason to delete the children that I have not thought of?
Thank you for your time!
Kind regards,
Denis
You are not guaranteed to receive a DeletedMetadata entry for each child in the case where you receive a DeletedMetadata for the parent, so you should make sure to delete all of the children in your local cache as well whenever you receive a DeletedMetadata for a parent. If you do not do so, your local cache may get out of sync with the state on Dropbox.
- Greg-DBDropbox Staff
You are not guaranteed to receive a DeletedMetadata entry for each child in the case where you receive a DeletedMetadata for the parent, so you should make sure to delete all of the children in your local cache as well whenever you receive a DeletedMetadata for a parent. If you do not do so, your local cache may get out of sync with the state on Dropbox.
- dkoshenkovExplorer | Level 4
Hi Greg,
Thank you very much for the fast reply! I get it now.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!