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.
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:
https://github.com/dropbox/dropbox-sdk-java/blob/3cfa878e5d73f06ed4782c8833b229838fd21472/examples/android/src/main/java/com/dropbox/core/examples/android/FilesAdapter.java#L82
Thanks for the quick response!