public static Dictionary<string,string> GetFiles(bool gelöschteanzeigen) { Dictionary<string, string> listdateien = new Dictionary<string, string>(); string pageToken = null; do { var request = service.Files.List(); if (gelöschteanzeigen) request.Q = "trashed = true and '" + RootId + "'" + " in parents"; else request.Q = "trashed = false and '" + RootId + "'" + " in parents"; request.Spaces = "drive"; request.Fields = "nextPageToken, files(id, name)"; request.PageToken = pageToken; var result = request.Execute(); foreach (var file in result.Files) { listdateien.Add(file.Id, file.Name); } pageToken = result.NextPageToken; } while (pageToken != null); return listdateien; }
Multiple corpora and Team Drives may be searched in a single query, though incomplete results may be returned if the combined corpus is too large. If the incompleteSearch field in the result is true, not all documents have been searched.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)