Reputation: 1156
How do I get getFiles() to fetch ALL the files in the folder in Google Drive. right now it only fetches the top 250 files and stops.
var files = DocsList.getFolder('Mendeley Desktop').getFiles();
Upvotes: 1
Views: 588
Reputation: 181057
DocsList.DEFAULT_RESULT_SIZE
is currently 250, so by default, you'll get a maximum of 250 results as a response from getFiles()
.
If you need more results, you can use the other getFiles()
method, getFiles(start, max)
to get up to DocsList.MAX_RESULT_SIZE
(currently 500) results at once, and use it with an offset to get the next DocsList.MAX_RESULT_SIZE
files.
Upvotes: 1
Reputation: 46812
This is how it works... to get the remaining items you should use method getFiles(start, max)
as explained in the documentation
Upvotes: 1