Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am using code such as the snippet below to retrieve file details from Dropbox. How can I tell which entries are folders?
I thought there would have been a member in FileMetadata but I am just not seeing it.
ListFolderResult result = mDbxClient.files().listFolder("" );
while( true )
{
for( Metadata metadata : result.getEntries() )
{
String sName = metadata.getPathLower();
FileMetadata fileMetadata = (FileMetadata) metadata;
OK, I found the answer here:
https://www.dropboxforum.com/t5/API-support/Get-the-modified-date-for-a-folder-or-file/td-p/184485
The short answer is that I need to test metadata with instanceof to see if it is an instance of FolderMetaData or FileMetaData. Java isn't my primary programming language so that was the last thing I would have thought of doing.
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!