Class FilesResource.ListRequest
Lists the user's files. This method accepts the q parameter, which is a search query combining one or
more search terms. For more information, see the Search for files &
folders guide. Note: This method returns all files by
default, including trashed files. If you don't want trashed files to appear in the list, use the
trashed=false query parameter to remove trashed files from the results.
Inheritance
Inherited Members
Namespace: Google.Apis.Drive.v3
Assembly: Google.Apis.Drive.v3.dll
Syntax
public class FilesResource.ListRequest : DriveBaseServiceRequest<FileList>, IClientServiceRequest<FileList>, IClientServiceRequest
Constructors
ListRequest(IClientService)
Constructs a new List request.
Declaration
public ListRequest(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Properties
Corpora
Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'q' parameter.
Declaration
[RequestParameter("corpora", RequestParameterType.Query)]
public virtual string Corpora { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Corpus
Deprecated: The source of files to list. Use 'corpora' instead.
Declaration
[RequestParameter("corpus", RequestParameterType.Query)]
public virtual FilesResource.ListRequest.CorpusEnum? Corpus { get; set; }
Property Value
| Type | Description |
|---|---|
| FilesResource.ListRequest.CorpusEnum? |
DriveId
ID of the shared drive to search.
Declaration
[RequestParameter("driveId", RequestParameterType.Query)]
public virtual string DriveId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
IncludeItemsFromAllDrives
Whether both My Drive and shared drive items should be included in results.
Declaration
[RequestParameter("includeItemsFromAllDrives", RequestParameterType.Query)]
public virtual bool? IncludeItemsFromAllDrives { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IncludeLabels
A comma-separated list of IDs of labels to include in the labelInfo part of the response.
Declaration
[RequestParameter("includeLabels", RequestParameterType.Query)]
public virtual string IncludeLabels { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IncludePermissionsForView
Specifies which additional view's permissions to include in the response. Only 'published' is supported.
Declaration
[RequestParameter("includePermissionsForView", RequestParameterType.Query)]
public virtual string IncludePermissionsForView { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IncludeTeamDriveItems
Deprecated: Use includeItemsFromAllDrives instead.
Declaration
[RequestParameter("includeTeamDriveItems", RequestParameterType.Query)]
public virtual bool? IncludeTeamDriveItems { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
OrderBy
A comma-separated list of sort keys. Valid keys are: * createdTime: When the file was created. *
folder: The folder ID. This field is sorted using alphabetical ordering. * modifiedByMeTime: The
last time the file was modified by the user. * modifiedTime: The last time the file was modified by
anyone. * name: The name of the file. This field is sorted using alphabetical ordering, so 1, 12, 2,
22. * name_natural: The name of the file. This field is sorted using natural sort ordering, so 1, 2,
12, 22. * quotaBytesUsed: The number of storage quota bytes used by the file. * recency: The most
recent timestamp from the file's date-time fields. * sharedWithMeTime: When the file was shared with
the user, if applicable. * starred: Whether the user has starred the file. * viewedByMeTime: The
last time the file was viewed by the user. Each key sorts ascending by default, but can be reversed with
the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name.
Declaration
[RequestParameter("orderBy", RequestParameterType.Query)]
public virtual string OrderBy { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PageSize
The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
Declaration
[RequestParameter("pageSize", RequestParameterType.Query)]
public virtual int? PageSize { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
PageToken
The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
Declaration
[RequestParameter("pageToken", RequestParameterType.Query)]
public virtual string PageToken { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Q
A query for filtering the file results. See the "Search for files & folders" guide for supported syntax.
Declaration
[RequestParameter("q", RequestParameterType.Query)]
public virtual string Q { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Spaces
A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
Declaration
[RequestParameter("spaces", RequestParameterType.Query)]
public virtual string Spaces { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SupportsAllDrives
Whether the requesting application supports both My Drives and shared drives.
Declaration
[RequestParameter("supportsAllDrives", RequestParameterType.Query)]
public virtual bool? SupportsAllDrives { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
SupportsTeamDrives
Deprecated: Use supportsAllDrives instead.
Declaration
[RequestParameter("supportsTeamDrives", RequestParameterType.Query)]
public virtual bool? SupportsTeamDrives { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
TeamDriveId
Deprecated: Use driveId instead.
Declaration
[RequestParameter("teamDriveId", RequestParameterType.Query)]
public virtual string TeamDriveId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
InitParameters()
Initializes List parameter list.
Declaration
protected override void InitParameters()