Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

Kyri's avatar
Kyri
Explorer | Level 4
6 years ago

listFolder: returns hasmore in a directory with only 2 files

Hi, I am experiensing this issue very often

it happens in the following scenario:

you have let's say 150 files

149 appear with simple listFolder

and one is not listed

then move all the 149 files and only leave the one that was not listed

and add one more

when you call 

listFolder: again it will only return 1 file

and hasMore will be TRUE

Any ideas how I can force list folder to always return all files in the directory?

(objC api)

Kind regards.

4 Replies

  • Kyri's avatar
    Kyri
    Explorer | Level 4
    6 years ago

    Has more  & listFolderContinue

    returns the new item(s)

     

    but I was wondering how do I "reset it" if you will

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    6 years ago

    Hi Kyri,

    Actually you can't. The call is asynchronous and the bechaviour can't be predicted or forced. You should always check for 'has_more' flag set and get in loop until flag gets unset.

    Hope this helps.

  • Kyri's avatar
    Kyri
    Explorer | Level 4
    6 years ago

    Thanks for the feedback Здравко

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Здравко is correct, you can't force or predict this. You need to always check hasMore and call back if needed. For reference, you can find the corresponding documentation for the Objective-C SDK in particular under listFolder and listFolderContinue.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,039 PostsLatest Activity: 2 days ago
415 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!