Hide
Apps Script

Class FilesResult

FilesResult

Deprecated. The DocsList service was deprecated on December 11, 2014. To work with files in Google Drive, use the Drive service instead.

Holds an array of files as well as a token used to enable pagination in methods that return a limited number of items such as DocsList.getAllFilesForPaging(number, token).

 

 // This example logs the names of all files in the user's drive in batches of 200.
 var pageSize = 200;
 var files = null;
 var token = null; // use a null token for the first lookup
 do {
   var result = DocsList.getAllFilesForPaging(pageSize, token);
   files = result.getFiles();
   token = result.getToken();
   for (var i = 0; i < files.length; i++) {
     Logger.log(files[i].getName());
   }
 } while (files.length >= pageSize);
 

Deprecated methods