Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
app5000
9 years agoExplorer | Level 3
python SDK
what is the difference between Dropbox.files_get_metadata and dropbox.files.FileMetadata? Which one should I use to get file server_Modified time?
- 9 years ago
Dropbox.files_get_metadata is a method, which you can use to get metadata for a file or folder. dropbox.files.FileMetadata is the class used to represent metadata for a file.
For example, when you call Dropbox.files_get_metadata for a file, it will return an instance of dropbox.files.FileMetadata. You can the get the server modified time via dropbox.files.FileMetadata.server_modified, that is, the server_modified attribute of the FileMetadata instance.
For example, that would look like this:
metadata = dbx.files_get_metadata("/test.txt") print("File: %s" % metadata.name) print("Server modified time: %s" % metadata.server_modified)
Greg-DB
Dropbox Community Moderator
9 years agoThe documentation is accurate. dropbox.files.FileMetadata is a subclass of dropbox.files.Metadata.
The files_get_metadata method will return an instance of dropbox.files.Metadata. That will be an instance of dropbox.files.FileMetadata for files, dropbox.files.FolderMetadata for folders, or dropbox.files.DeletedMetadata for a deleted item.
You can use isinstance to check if the instance is a file, etc., as shown here:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!