<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [Java SDK V2] How to distinguish if Metadata is file or folder in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/195291#M8893</link>
    <description>Yes, using instanceof&amp;nbsp;is the recommended way. For example:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/FilesAdapter.java#L82" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/FilesAdapter.java#L82&lt;/A&gt;</description>
    <pubDate>Tue, 22 Nov 2016 17:59:00 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-11-22T17:59:00Z</dc:date>
    <item>
      <title>[Java SDK V2] How to distinguish if Metadata is file or folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/195263#M8890</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        final Metadata fileMetadata = client.files().getMetadata(destFile);
        assertTrue(fileMetadata instanceof FileMetadata);&lt;BR /&gt;
        final Metadata folderMetadata = client.files().getMetadata(destFolder);
        assertTrue(folderMetadata instanceof FolderMetadata);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any recomended way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michal&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:28:07 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/195263#M8890</guid>
      <dc:creator>michal_k</dc:creator>
      <dc:date>2019-05-29T09:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: [Java SDK V2] How to distinguish if Metadata is file or folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/195291#M8893</link>
      <description>Yes, using instanceof&amp;nbsp;is the recommended way. For example:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/FilesAdapter.java#L82" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/FilesAdapter.java#L82&lt;/A&gt;</description>
      <pubDate>Tue, 22 Nov 2016 17:59:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/195291#M8893</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-11-22T17:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: [Java SDK V2] How to distinguish if Metadata is file or folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/231972#M12653</link>
      <description>&lt;P&gt;&lt;FONT face="verdana" size="3"&gt;Java &lt;STRONG&gt;instanceof&lt;/STRONG&gt; 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...&lt;A href="http://net-informations.com/java/cjava/instanceof.htm" target="_self"&gt;&lt;STRONG&gt;instanceof&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;keyword&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana" size="3"&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 05:19:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-SDK-V2-How-to-distinguish-if-Metadata-is-file-or-folder/m-p/231972#M12653</guid>
      <dc:creator>jovier m.</dc:creator>
      <dc:date>2017-07-13T05:19:57Z</dc:date>
    </item>
  </channel>
</rss>

