Show / Hide Table of Contents

Class File

The metadata for a file.

Inheritance
System.Object
File
Implements
IDirectResponseSchema
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Drive.v3.Data
Assembly: Google.Apis.Drive.v3.dll
Syntax
public class File : IDirectResponseSchema

Properties

AppProperties

A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests.

Declaration
[JsonProperty("appProperties")]
public virtual IDictionary<string, string> AppProperties { get; set; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

Capabilities

Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.

Declaration
[JsonProperty("capabilities")]
public virtual File.CapabilitiesData Capabilities { get; set; }
Property Value
Type Description
File.CapabilitiesData

ContentHints

Additional information about the content of the file. These fields are never populated in responses.

Declaration
[JsonProperty("contentHints")]
public virtual File.ContentHintsData ContentHints { get; set; }
Property Value
Type Description
File.ContentHintsData

CopyRequiresWriterPermission

Whether the options to copy, print, or download this file, should be disabled for readers and commenters.

Declaration
[JsonProperty("copyRequiresWriterPermission")]
public virtual bool? CopyRequiresWriterPermission { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

CreatedTime

System.DateTime representation of CreatedTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTime? CreatedTime { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

CreatedTimeRaw

The time at which the file was created (RFC 3339 date-time).

Declaration
[JsonProperty("createdTime")]
public virtual string CreatedTimeRaw { get; set; }
Property Value
Type Description
System.String

Description

A short description of the file.

Declaration
[JsonProperty("description")]
public virtual string Description { get; set; }
Property Value
Type Description
System.String

DriveId

ID of the shared drive the file resides in. Only populated for items in shared drives.

Declaration
[JsonProperty("driveId")]
public virtual string DriveId { get; set; }
Property Value
Type Description
System.String

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
System.String

ExplicitlyTrashed

Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.

Declaration
[JsonProperty("explicitlyTrashed")]
public virtual bool? ExplicitlyTrashed { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

ExportLinks

Links for exporting Google Docs to specific formats.

Declaration
[JsonProperty("exportLinks")]
public virtual IDictionary<string, string> ExportLinks { get; set; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

FileExtension

The final component of fullFileExtension. This is only available for files with binary content in Google Drive.

Declaration
[JsonProperty("fileExtension")]
public virtual string FileExtension { get; set; }
Property Value
Type Description
System.String

FolderColorRgb

The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead.

Declaration
[JsonProperty("folderColorRgb")]
public virtual string FolderColorRgb { get; set; }
Property Value
Type Description
System.String

FullFileExtension

The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.

Declaration
[JsonProperty("fullFileExtension")]
public virtual string FullFileExtension { get; set; }
Property Value
Type Description
System.String

HasAugmentedPermissions

Whether there are permissions directly on this file. This field is only populated for items in shared drives.

Declaration
[JsonProperty("hasAugmentedPermissions")]
public virtual bool? HasAugmentedPermissions { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

HasThumbnail

Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.

Declaration
[JsonProperty("hasThumbnail")]
public virtual bool? HasThumbnail { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

HeadRevisionId

The ID of the file's head revision. This is currently only available for files with binary content in Google Drive.

Declaration
[JsonProperty("headRevisionId")]
public virtual string HeadRevisionId { get; set; }
Property Value
Type Description
System.String

IconLink

A static, unauthenticated link to the file's icon.

Declaration
[JsonProperty("iconLink")]
public virtual string IconLink { get; set; }
Property Value
Type Description
System.String

Id

The ID of the file.

Declaration
[JsonProperty("id")]
public virtual string Id { get; set; }
Property Value
Type Description
System.String

ImageMediaMetadata

Additional metadata about image media, if available.

Declaration
[JsonProperty("imageMediaMetadata")]
public virtual File.ImageMediaMetadataData ImageMediaMetadata { get; set; }
Property Value
Type Description
File.ImageMediaMetadataData

IsAppAuthorized

Whether the file was created or opened by the requesting app.

Declaration
[JsonProperty("isAppAuthorized")]
public virtual bool? IsAppAuthorized { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

Kind

Identifies what kind of resource this is. Value: the fixed string "drive#file".

Declaration
[JsonProperty("kind")]
public virtual string Kind { get; set; }
Property Value
Type Description
System.String

LastModifyingUser

The last user to modify the file.

Declaration
[JsonProperty("lastModifyingUser")]
public virtual User LastModifyingUser { get; set; }
Property Value
Type Description
User

Md5Checksum

The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.

Declaration
[JsonProperty("md5Checksum")]
public virtual string Md5Checksum { get; set; }
Property Value
Type Description
System.String

MimeType

The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.

Declaration
[JsonProperty("mimeType")]
public virtual string MimeType { get; set; }
Property Value
Type Description
System.String

ModifiedByMe

Whether the file has been modified by this user.

Declaration
[JsonProperty("modifiedByMe")]
public virtual bool? ModifiedByMe { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

ModifiedByMeTime

System.DateTime representation of ModifiedByMeTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTime? ModifiedByMeTime { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

ModifiedByMeTimeRaw

The last time the file was modified by the user (RFC 3339 date-time).

Declaration
[JsonProperty("modifiedByMeTime")]
public virtual string ModifiedByMeTimeRaw { get; set; }
Property Value
Type Description
System.String

ModifiedTime

System.DateTime representation of ModifiedTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTime? ModifiedTime { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

ModifiedTimeRaw

The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.

Declaration
[JsonProperty("modifiedTime")]
public virtual string ModifiedTimeRaw { get; set; }
Property Value
Type Description
System.String

Name

The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.

Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type Description
System.String

OriginalFilename

The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.

Declaration
[JsonProperty("originalFilename")]
public virtual string OriginalFilename { get; set; }
Property Value
Type Description
System.String

OwnedByMe

Whether the user owns the file. Not populated for items in shared drives.

Declaration
[JsonProperty("ownedByMe")]
public virtual bool? OwnedByMe { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

Owners

The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.

Declaration
[JsonProperty("owners")]
public virtual IList<User> Owners { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<User>

Parents

The IDs of the parent folders which contain the file. If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.

Declaration
[JsonProperty("parents")]
public virtual IList<string> Parents { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

PermissionIds

List of permission IDs for users with access to this file.

Declaration
[JsonProperty("permissionIds")]
public virtual IList<string> PermissionIds { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

Permissions

The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.

Declaration
[JsonProperty("permissions")]
public virtual IList<Permission> Permissions { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<Permission>

Properties

A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests.

Declaration
[JsonProperty("properties")]
public virtual IDictionary<string, string> Properties { get; set; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

QuotaBytesUsed

The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.

Declaration
[JsonProperty("quotaBytesUsed")]
public virtual long? QuotaBytesUsed { get; set; }
Property Value
Type Description
System.Nullable<System.Int64>

Shared

Whether the file has been shared. Not populated for items in shared drives.

Declaration
[JsonProperty("shared")]
public virtual bool? Shared { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

SharedWithMeTime

System.DateTime representation of SharedWithMeTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTime? SharedWithMeTime { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

SharedWithMeTimeRaw

The time at which the file was shared with the user, if applicable (RFC 3339 date-time).

Declaration
[JsonProperty("sharedWithMeTime")]
public virtual string SharedWithMeTimeRaw { get; set; }
Property Value
Type Description
System.String

SharingUser

The user who shared the file with the requesting user, if applicable.

Declaration
[JsonProperty("sharingUser")]
public virtual User SharingUser { get; set; }
Property Value
Type Description
User

Size

The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive.

Declaration
[JsonProperty("size")]
public virtual long? Size { get; set; }
Property Value
Type Description
System.Nullable<System.Int64>

Spaces

The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.

Declaration
[JsonProperty("spaces")]
public virtual IList<string> Spaces { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

Starred

Whether the user has starred the file.

Declaration
[JsonProperty("starred")]
public virtual bool? Starred { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

TeamDriveId

Deprecated - use driveId instead.

Declaration
[JsonProperty("teamDriveId")]
public virtual string TeamDriveId { get; set; }
Property Value
Type Description
System.String

ThumbnailLink

A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.

Declaration
[JsonProperty("thumbnailLink")]
public virtual string ThumbnailLink { get; set; }
Property Value
Type Description
System.String

ThumbnailVersion

The thumbnail version for use in thumbnail cache invalidation.

Declaration
[JsonProperty("thumbnailVersion")]
public virtual long? ThumbnailVersion { get; set; }
Property Value
Type Description
System.Nullable<System.Int64>

Trashed

Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash.

Declaration
[JsonProperty("trashed")]
public virtual bool? Trashed { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

TrashedTime

System.DateTime representation of TrashedTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTime? TrashedTime { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

TrashedTimeRaw

The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.

Declaration
[JsonProperty("trashedTime")]
public virtual string TrashedTimeRaw { get; set; }
Property Value
Type Description
System.String

TrashingUser

If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.

Declaration
[JsonProperty("trashingUser")]
public virtual User TrashingUser { get; set; }
Property Value
Type Description
User

Version

A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.

Declaration
[JsonProperty("version")]
public virtual long? Version { get; set; }
Property Value
Type Description
System.Nullable<System.Int64>

VideoMediaMetadata

Additional metadata about video media. This may not be available immediately upon upload.

Declaration
[JsonProperty("videoMediaMetadata")]
public virtual File.VideoMediaMetadataData VideoMediaMetadata { get; set; }
Property Value
Type Description
File.VideoMediaMetadataData

ViewedByMe

Whether the file has been viewed by this user.

Declaration
[JsonProperty("viewedByMe")]
public virtual bool? ViewedByMe { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

ViewedByMeTime

System.DateTime representation of ViewedByMeTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTime? ViewedByMeTime { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

ViewedByMeTimeRaw

The last time the file was viewed by the user (RFC 3339 date-time).

Declaration
[JsonProperty("viewedByMeTime")]
public virtual string ViewedByMeTimeRaw { get; set; }
Property Value
Type Description
System.String

ViewersCanCopyContent

Deprecated - use copyRequiresWriterPermission instead.

Declaration
[JsonProperty("viewersCanCopyContent")]
public virtual bool? ViewersCanCopyContent { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

WebContentLink

A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.

Declaration
[JsonProperty("webContentLink")]
public virtual string WebContentLink { get; set; }
Property Value
Type Description
System.String

WebViewLink

A link for opening the file in a relevant Google editor or viewer in a browser.

Declaration
[JsonProperty("webViewLink")]
public virtual string WebViewLink { get; set; }
Property Value
Type Description
System.String

WritersCanShare

Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.

Declaration
[JsonProperty("writersCanShare")]
public virtual bool? WritersCanShare { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

Implements

IDirectResponseSchema
Back to top