Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Dennis T.6's avatar
Dennis T.6
New member | Level 2
10 years ago

Java V2 SDK - get metadata

Using Java SDK v2, I need to get metadata for a file or all files in a directory. Specifically the client modified timestamp.

I cannot find this anywhere in the V2 docs, specifically the DbxFiles.Metadata class only contains name, pathLower and parentSharedFolderId.

How is this done?

2 Replies

Replies have been turned off for this discussion
  • You can downcast to http://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/v2/DbxFiles.FileMetadata.html, which has a clientModified field. (Of course this only works if the thing you got metadata for is in fact a file. A folder will return DbxFiles.FolderMetadata instead, and deleted items will return DbxFiles.DeletedMetadata.)

About Dropbox API Support and Feedback

Node avatar for 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!