I've been testing the list files API, but seeing unexpected results. Basically, I ask info on a path, process the results, and then ask for a "new" cursor via "listFolderGetLatestCursor" but it says there are no changes. Am I missing something?
// make request for path ListFolderBuilder listFolderBuilder = client.files().listFolderBuilder(path);
//.... do work... // get more results
result = client.files().listFolderContinue(result.getCursor());
// get new cursor String cursor2 = client.files().listFolderGetLatestCursor(path).getCursor();
// store cursor // modify files, do stuff... // come back 1 day later
result = client.files().listFolderContinue(cursor2);
To stay up to date though, you shouldn't call listFolderGetLatestCursor after you've already begun getting a listing. Instead, you should use the last cursor returned from listFolder or listFolderContinue.
Please try that out and let me know if you're still having trouble, and if so, please share your latest code. (I notice your code is a bit different between here and your StackOverflow post, so I'm not sure exactly what you're doing.)
Thanks. I put a bit more detail in the StackOverflow post mostly out of having issues formatting the code here. Anything beyond that was accidental. I'll give it a try without calling listFolderGetLatestCursor and see if that improves things, hopefully it will.
That did seem to do the trick, reusing the cursor and not calling listFolderGetLatestCursor meant that after 16 hours, I was getting the changes I expected. I'll leave the StackOverflow question open for a day or two if you want to post the answer there and get the credit.