How can we list all files from a specific folder on Google Drive

前端 未结 4 1232
灰色年华
灰色年华 2021-01-21 01:48

We noticed that Google Drive API Javascript allows you to list all files from an specific folder, however it brings just basic details from the file. If we want

4条回答
  •  借酒劲吻你
    2021-01-21 02:14

    I did much googled for this question but the answer is right here. You have to use following code snippet as i had used:

    Files.List request = mService.files().list().setQ("'Your Folder ID Here' in parents");
    FileList files = request.execute();
    if (files != null) {
      for (File file : files.getItems()) {
        // Meta data
        Log.i("", "Title: " + file.getTitle());
        Log.i("", "Description: " + file.getDescription());
        Log.i("", "MIME type: " + file.getMimeType());
      }
    }
    

    I am sure it will work for you.

提交回复
热议问题