<?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: How to display folders in the file list Dropbox API (Swift 5) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448810#M23358</link>
    <description>&lt;P&gt;Thanks, it really helped me!&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 16:10:35 GMT</pubDate>
    <dc:creator>VyacheslavB</dc:creator>
    <dc:date>2020-08-27T16:10:35Z</dc:date>
    <item>
      <title>How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448089#M23335</link>
      <description>&lt;P&gt;I get a list of the user's files and then filter it to show only the music files. But I also want to see subfolders. How should I set up my filter for this? Could you help me.&lt;BR /&gt;My function where I get the list of files looks like this:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-08-25 at 12.03.28.png" style="width: 650px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/17508iAC586C83024B8DE7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-08-25 at 12.03.28.png" alt="Screen Shot 2020-08-25 at 12.03.28.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also want to be able to enter a subfolder, as I understand it, for this I need to insert the path to the subfolder in path: "/ someFolder". But how can I get this path?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 09:37:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448089#M23335</guid>
      <dc:creator>VyacheslavB</dc:creator>
      <dc:date>2020-08-25T09:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448188#M23339</link>
      <description>&lt;P&gt;If you want to access subfolders as well when listing a folder, you can set recursive:true when calling&amp;nbsp;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox11FilesRoutesC10listFolder4path9recursive16includeMediaInfo0I7Deleted0I24HasExplicitSharedMembers0I14MountedFolders5limit10sharedLink0I14PropertyGroups0i15NonDownloadableC0AA10RpcRequestCyAA0C0C04ListF16ResultSerializerCAR04ListF15ErrorSerializerCGSS_S5bs6UInt32VSgAR0oU0CSgAA14FilePropertiesC18TemplateFilterBaseOSgSbtF" target="_self"&gt;listFolder&lt;/A&gt;. That will make the results include nested entries as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively you can call separately to specifically list a particular subfolder, by passing in the path. To do so, get and pass in the relevant&amp;nbsp;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/Files/Metadata.html#/s:13SwiftyDropbox5FilesC8MetadataC9pathLowerSSSgvp" target="_self"&gt;Metadata.pathLower&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either way, make sure you also have&amp;nbsp;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox11FilesRoutesC18listFolderContinue6cursorAA10RpcRequestCyAA0C0C04ListF16ResultSerializerCAI0kfg5ErrorM0CGSS_tF" target="_self"&gt;listFolderContinue&lt;/A&gt; implemented (as documented under&amp;nbsp;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox11FilesRoutesC10listFolder4path9recursive16includeMediaInfo0I7Deleted0I24HasExplicitSharedMembers0I14MountedFolders5limit10sharedLink0I14PropertyGroups0i15NonDownloadableC0AA10RpcRequestCyAA0C0C04ListF16ResultSerializerCAR04ListF15ErrorSerializerCGSS_S5bs6UInt32VSgAR0oU0CSgAA14FilePropertiesC18TemplateFilterBaseOSgSbtF" target="_self"&gt;listFolder&lt;/A&gt;) to make sure you're getting all of the entries.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 14:01:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448188#M23339</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-08-25T14:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448365#M23344</link>
      <description>&lt;P&gt;If I want to use the second option (using the folder path), then how do I display only music files and folders? I use .hasSuffix for sorting, but then I cannot see the folder in the list.&lt;BR /&gt;How can I separate folders from files in code. A file has its extension, but how to filter so that folders are visible in the list too?&lt;/P&gt;&lt;P&gt;As you understand, I want to have some attribute to know this is folder or file.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 12:52:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448365#M23344</guid>
      <dc:creator>VyacheslavB</dc:creator>
      <dc:date>2020-08-26T12:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448487#M23347</link>
      <description>&lt;P&gt;To check if a particular entry is a &lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/Files/FileMetadata.html" target="_self"&gt;file&lt;/A&gt; or a &lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/Files/FolderMetadata.html" target="_self"&gt;folder&lt;/A&gt;, you can check the type of the entry, such as by switching on it as shown in &lt;A href="https://github.com/dropbox/SwiftyDropbox#response-handling-edge-cases" target="_self"&gt;this example&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 14:42:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448487#M23347</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-08-26T14:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448661#M23348</link>
      <description>&lt;P&gt;When I try to use code from example, I get a warning: Cast from 'Files.ListFolderResult' to unrelated type 'Files.FileMetadata' always fails.&lt;BR /&gt;Maybe there is another option or a better example?&amp;nbsp;Or am I doing something wrong?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-08-27 at 09.14.35.png" style="width: 814px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/17541iC12345D52AB36586/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-08-27 at 09.14.35.png" alt="Screen Shot 2020-08-27 at 09.14.35.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 06:30:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448661#M23348</guid>
      <dc:creator>VyacheslavB</dc:creator>
      <dc:date>2020-08-27T06:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448802#M23354</link>
      <description>&lt;P&gt;You're trying to cast the&amp;nbsp;ListFolderResult itself, which isn't a&amp;nbsp;type of Metadata. You should instead be casting each Metadata object in the&amp;nbsp;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/Files/ListFolderResult.html#/s:13SwiftyDropbox5FilesC16ListFolderResultC7entriesSayAC8MetadataCGvp" target="_self"&gt;ListFolderResult.entries&lt;/A&gt; array.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 15:26:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448802#M23354</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-08-27T15:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448810#M23358</link>
      <description>&lt;P&gt;Thanks, it really helped me!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 16:10:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/448810#M23358</guid>
      <dc:creator>VyacheslavB</dc:creator>
      <dc:date>2020-08-27T16:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/449802#M23377</link>
      <description>Documentaions</description>
      <pubDate>Tue, 01 Sep 2020 03:49:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/449802#M23377</guid>
      <dc:creator>Mimi_89</dc:creator>
      <dc:date>2020-09-01T03:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/633787#M29246</link>
      <description>&lt;P&gt;Hi Viyalexhab,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you declare the variable fileList?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying t do the same thing, so I can append the files to it. But I can't figure out what type of variable you need to use to be able to append.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 03:15:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/633787#M29246</guid>
      <dc:creator>roggerCorrea</dc:creator>
      <dc:date>2022-11-03T03:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/633789#M29247</link>
      <description>&lt;P&gt;I get this error, does anybody knows what to do?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roggerCorrea_0-1667445846137.png" style="width: 905px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32736i04A36C1C88552AC5/image-dimensions/905x190?v=v2" width="905" height="190" role="button" title="roggerCorrea_0-1667445846137.png" alt="roggerCorrea_0-1667445846137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 03:24:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/633789#M29247</guid>
      <dc:creator>roggerCorrea</dc:creator>
      <dc:date>2022-11-03T03:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/633939#M29250</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1588063"&gt;@roggerCorrea&lt;/a&gt; It looks like fileList would be an array, perhaps initialized like 'var fileList = [Any]()', or maybe more ideally 'var fileList = [Files.Metadata]()'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your cast is failing because you're attempting to cast the entire array of Metadata, that is, your 'response', which is the listFolderResult?.entries, instead of individual Metadata entries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should instead first iterate over the entries to get each entry, like the 'for entry in result.entries {' line in the original post shows.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 15:30:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/633939#M29250</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-11-03T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to display folders in the file list Dropbox API (Swift 5)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/634669#M29288</link>
      <description>&lt;P&gt;Hi Greg, thank you so much. I'm new to Swift and still figuring out many things.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was of great help!&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 23:53:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-folders-in-the-file-list-Dropbox-API-Swift-5/m-p/634669#M29288</guid>
      <dc:creator>roggerCorrea</dc:creator>
      <dc:date>2022-11-06T23:53:02Z</dc:date>
    </item>
  </channel>
</rss>

