Hide
Apps Script

Class FoldersResult

FoldersResult

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 folders as well as a token used to enable pagination in methods that return a limited number of items such as DocsList.getAllFoldersForPaging(number, token).

 

 // This example logs the names of all folders in the users drive in batches of 5
 var pageSize = 5;
 var folders = null;
 var token = null; // using null token for the first lookup
 do {
   var result = DocsList.getAllFoldersForPaging(pageSize, token);
   folders = result.getFolders();
   token = result.getToken();
   for (var i = 0; i < folders.length; i++) {
     Logger.log(folders[i].getName());
   }
 } while (folders.length >= pageSize);
 

Deprecated methods