1

IAM Working on app which use Google Drive API. Could I get top level folders in the Google drive using drive API? What is the Scope For that?

4

1 回答 1

0

我知道这是旧的,但我今天遇到了同样的问题。这就是我解决它的方法:

function showTopLevel() { 
  var folders = DriveApp.getRootFolder().getFolders();
  while (folders.hasNext()) {
    var folder = folders.next();
    Logger.log(folder.getName());
  }
}
于 2014-06-12T09:21:13.457 回答