Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Eric J.12
9 years agoExplorer | Level 4
Finding if Metadata is for file or folder
Hi,
I am migrating to API v2 and I am using the Java SDK 2.1.1
In v1, there was a way to check if a metadata represented a file or folder. I can't find a method in v2 to get this information. Do you think this could be added? Thank you.
2 Replies
- Greg-DB9 years ago
Dropbox Community Moderator
Hi Eric, you can use instanceof to determine if a given Metadata is an instance of FileMetadata, FolderMetadata, or DeletedMetadata and then cast it accordingly, e.g., as shown here:
- Eric J.129 years agoExplorer | Level 4
Thanks for the quick response!
About 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!