


Passing your cursor to the call will simply block until a change is detected (or its timeout occurs). These client-side applications should instead leverage /files/list_folder/longpoll for these cases. Waiting for User Changeįor interactive applications that need real-time notification of a change in Dropbox, rapid polling is inefficient. If your application is only interested in changes going forward, the /files/list_folder/get_latest_cursor will return the most recent cursor, without needing to iterate through list and continue calls. If the folder itself that the cursor refers to is deleted, the call will return a 409 path error. This indicates you should issue a new call to /files/list_folder and iterate to obtain a new cursor. A call to continue with an expired cursor will return a 409 reset error.
#DROPBOX DEVELOPER APP FILES UPDATE#
Thus, while polling, be sure to always update to the latest returned cursor - even if no results are returned. PollingĪs a result of this property of folder cursors, storing the cursor value allows you to poll for changes to the target directory.įolder cursors are long-lived, but may expire if unused for an extend time. The ListFolderResult returned in the call includes indication of file change (add/modify), folder change, or deletion. Your list /files/list_folder_continue with a given cursor may return 0 results with has_more:false now, but calling it after modifying content in the folder will return those changes. Folder cursors are pointers to the folder at a particular time - and thus you may use a cursor to fetch changes that occurred after the time the cursor value was issued. However, these cursors are not only for useful pagination. Successfully enumerating all files in a folder requires calling /files/list_folder_continue with each successive cursor string until has_more is false. This call also returns the has_more boolean, indicating if more results are available, as well as a cursor. The /files/list_folder API call is used to list content with a Dropbox folder. Dropbox provides tools for developers to poll, wait for, or be notified of changes to users files.
