<?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: Quickest way to check if a folder and subfolders are empty? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524314#M25487</link>
    <description>&lt;P&gt;While it may require more than one API call, using the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_self"&gt;/2/files/list_folder&lt;/A&gt;[/&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue" target="_self"&gt;continue&lt;/A&gt;] endpoints (or corresponding native methods in the SDKs) is the best way to check if a particular folder is empty or not. The exact number of entries per page and total number of pages is not guaranteed and may vary by folder/account, so you would need to call back to /continue until 'has_more' is returned as false. I'll also pass this along as a feature request for a simpler way to check that, but I can't promise if or when that might be implemented.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jun 2021 19:13:45 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-06-02T19:13:45Z</dc:date>
    <item>
      <title>Quickest way to check if a folder and subfolders are empty?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524309#M25486</link>
      <description>&lt;P&gt;I only want the Dropbox Embedder to show if the specified folder actually have any files in it.&lt;BR /&gt;&lt;BR /&gt;What is the best way to figure out if a folder (or subfolder) has any files?&lt;BR /&gt;&lt;BR /&gt;At first I thought about "&lt;STRONG&gt;list_folder"&amp;nbsp;&lt;/STRONG&gt;and loop though the result to see if theres any file. But list_folder only returns 1 directory, and apparently need to use "continue" to get anything more? That's a bunch of queries!&lt;BR /&gt;&lt;BR /&gt;The "&lt;STRONG&gt;Search&lt;/STRONG&gt;" endpoint was my next thought, but I'm not sure how to search only for files?&lt;BR /&gt;&lt;BR /&gt;Anyone have any suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 11:57:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524309#M25486</guid>
      <dc:creator>James_T</dc:creator>
      <dc:date>2021-06-07T11:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Quickest way to check if a folder and subfolders are empty?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524314#M25487</link>
      <description>&lt;P&gt;While it may require more than one API call, using the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_self"&gt;/2/files/list_folder&lt;/A&gt;[/&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue" target="_self"&gt;continue&lt;/A&gt;] endpoints (or corresponding native methods in the SDKs) is the best way to check if a particular folder is empty or not. The exact number of entries per page and total number of pages is not guaranteed and may vary by folder/account, so you would need to call back to /continue until 'has_more' is returned as false. I'll also pass this along as a feature request for a simpler way to check that, but I can't promise if or when that might be implemented.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 19:13:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524314#M25487</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-06-02T19:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Quickest way to check if a folder and subfolders are empty?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524714#M25506</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;The folder I tested list_folder with, contains only 4 directories. The API call only returned 1 folder (+ the root folder). Is that normal behavior?&lt;BR /&gt;&lt;BR /&gt;It thought it would only require the continue call if there were lots of folder/files?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 10:35:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524714#M25506</guid>
      <dc:creator>James_T</dc:creator>
      <dc:date>2021-06-04T10:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Quickest way to check if a folder and subfolders are empty?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524802#M25512</link>
      <description>&lt;P&gt;The number of entries you get back per page is not guaranteed, and it may require multiples calls even if there is not a large number of entries. You'll need to implement both list_folder and list_folder/continue and always call back for more entries until has_more is false in order to get the full listing.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 15:41:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Quickest-way-to-check-if-a-folder-and-subfolders-are-empty/m-p/524802#M25512</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-06-04T15:41:21Z</dc:date>
    </item>
  </channel>
</rss>

