Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello,
I need to distunguish, if Metadata I got is file or folder. Is there any recommended way, how to do this? I came up just with using instanceof operator, here is a snippet from integration tests:
final Metadata fileMetadata = client.files().getMetadata(destFile); assertTrue(fileMetadata instanceof FileMetadata);
final Metadata folderMetadata = client.files().getMetadata(destFolder); assertTrue(folderMetadata instanceof FolderMetadata);
Is there any recomended way?
Thank you,
Michal
Java instanceof is a keyword. It is a binary operator used to test if an object (instance) is a subtype of a given Type. It returns either true or false. More about...instanceof keyword
Mark
Hi there!
If you need more help you can view your support options (expected response time for a 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!