Table of Contents

Class File

Namespace
Google.Apis.Drive.v3.Data
Assembly
Google.Apis.Drive.v3.dll

The metadata for a file.

public class File : IDirectResponseSchema
Inheritance
File
Implements
IDirectResponseSchema
Inherited Members

Constructors

File()

public File()

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.

public virtual IDictionary<string, string> AppProperties { get; set; }

Property Value

IDictionary<string, string>

Capabilities

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

public virtual File.CapabilitiesData Capabilities { get; set; }

Property Value

File.CapabilitiesData

ContentHints

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

public virtual File.ContentHintsData ContentHints { get; set; }

Property Value

File.ContentHintsData

ContentRestrictions

Restrictions for accessing the content of the file. Only populated if such a restriction exists.

public virtual IList<ContentRestriction> ContentRestrictions { get; set; }

Property Value

IList<ContentRestriction>

CopyRequiresWriterPermission

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

public virtual bool? CopyRequiresWriterPermission { get; set; }

Property Value

bool?

CreatedTime

DateTime representation of CreatedTimeRaw.

public virtual DateTime? CreatedTime { get; set; }

Property Value

DateTime?

CreatedTimeRaw

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

public virtual string CreatedTimeRaw { get; set; }

Property Value

string

Description

A short description of the file.

public virtual string Description { get; set; }

Property Value

string

DriveId

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

public virtual string DriveId { get; set; }

Property Value

string

ETag

The ETag of the item.

public virtual string ETag { get; set; }

Property Value

string

ExplicitlyTrashed

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

public virtual bool? ExplicitlyTrashed { get; set; }

Property Value

bool?

Links for exporting Google Docs to specific formats.

public virtual IDictionary<string, string> ExportLinks { get; set; }

Property Value

IDictionary<string, string>

FileExtension

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

public virtual string FileExtension { get; set; }

Property Value

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.

public virtual string FolderColorRgb { get; set; }

Property Value

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.

public virtual string FullFileExtension { get; set; }

Property Value

string

HasAugmentedPermissions

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

public virtual bool? HasAugmentedPermissions { get; set; }

Property Value

bool?

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.

public virtual bool? HasThumbnail { get; set; }

Property Value

bool?

HeadRevisionId

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

public virtual string HeadRevisionId { get; set; }

Property Value

string

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

public virtual string IconLink { get; set; }

Property Value

string

Id

The ID of the file.

public virtual string Id { get; set; }

Property Value

string

ImageMediaMetadata

Additional metadata about image media, if available.

public virtual File.ImageMediaMetadataData ImageMediaMetadata { get; set; }

Property Value

File.ImageMediaMetadataData

IsAppAuthorized

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

public virtual bool? IsAppAuthorized { get; set; }

Property Value

bool?

Kind

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

public virtual string Kind { get; set; }

Property Value

string

LastModifyingUser

The last user to modify the file.

public virtual User LastModifyingUser { get; set; }

Property Value

User

Md5Checksum

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

public virtual string Md5Checksum { get; set; }

Property Value

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.

public virtual string MimeType { get; set; }

Property Value

string

ModifiedByMe

Whether the file has been modified by this user.

public virtual bool? ModifiedByMe { get; set; }

Property Value

bool?

ModifiedByMeTime

DateTime representation of ModifiedByMeTimeRaw.

public virtual DateTime? ModifiedByMeTime { get; set; }

Property Value

DateTime?

ModifiedByMeTimeRaw

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

public virtual string ModifiedByMeTimeRaw { get; set; }

Property Value

string

ModifiedTime

DateTime representation of ModifiedTimeRaw.

public virtual DateTime? ModifiedTime { get; set; }

Property Value

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.

public virtual string ModifiedTimeRaw { get; set; }

Property Value

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.

public virtual string Name { get; set; }

Property Value

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.

public virtual string OriginalFilename { get; set; }

Property Value

string

OwnedByMe

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

public virtual bool? OwnedByMe { get; set; }

Property Value

bool?

Owners

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

public virtual IList<User> Owners { get; set; }

Property Value

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.

public virtual IList<string> Parents { get; set; }

Property Value

IList<string>

PermissionIds

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

public virtual IList<string> PermissionIds { get; set; }

Property Value

IList<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.

public virtual IList<Permission> Permissions { get; set; }

Property Value

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.

public virtual IDictionary<string, string> Properties { get; set; }

Property Value

IDictionary<string, 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.

public virtual long? QuotaBytesUsed { get; set; }

Property Value

long?

Shared

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

public virtual bool? Shared { get; set; }

Property Value

bool?

SharedWithMeTime

DateTime representation of SharedWithMeTimeRaw.

public virtual DateTime? SharedWithMeTime { get; set; }

Property Value

DateTime?

SharedWithMeTimeRaw

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

public virtual string SharedWithMeTimeRaw { get; set; }

Property Value

string

SharingUser

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

public virtual User SharingUser { get; set; }

Property Value

User

ShortcutDetails

Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.

public virtual File.ShortcutDetailsData ShortcutDetails { get; set; }

Property Value

File.ShortcutDetailsData

Size

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

public virtual long? Size { get; set; }

Property Value

long?

Spaces

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

public virtual IList<string> Spaces { get; set; }

Property Value

IList<string>

Starred

Whether the user has starred the file.

public virtual bool? Starred { get; set; }

Property Value

bool?

TeamDriveId

Deprecated - use driveId instead.

public virtual string TeamDriveId { get; set; }

Property Value

string

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.

public virtual string ThumbnailLink { get; set; }

Property Value

string

ThumbnailVersion

The thumbnail version for use in thumbnail cache invalidation.

public virtual long? ThumbnailVersion { get; set; }

Property Value

long?

Trashed

Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.

public virtual bool? Trashed { get; set; }

Property Value

bool?

TrashedTime

DateTime representation of TrashedTimeRaw.

public virtual DateTime? TrashedTime { get; set; }

Property Value

DateTime?

TrashedTimeRaw

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

public virtual string TrashedTimeRaw { get; set; }

Property Value

string

TrashingUser

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

public virtual User TrashingUser { get; set; }

Property Value

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.

public virtual long? Version { get; set; }

Property Value

long?

VideoMediaMetadata

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

public virtual File.VideoMediaMetadataData VideoMediaMetadata { get; set; }

Property Value

File.VideoMediaMetadataData

ViewedByMe

Whether the file has been viewed by this user.

public virtual bool? ViewedByMe { get; set; }

Property Value

bool?

ViewedByMeTime

DateTime representation of ViewedByMeTimeRaw.

public virtual DateTime? ViewedByMeTime { get; set; }

Property Value

DateTime?

ViewedByMeTimeRaw

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

public virtual string ViewedByMeTimeRaw { get; set; }

Property Value

string

ViewersCanCopyContent

Deprecated - use copyRequiresWriterPermission instead.

public virtual bool? ViewersCanCopyContent { get; set; }

Property Value

bool?

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

public virtual string WebContentLink { get; set; }

Property Value

string

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

public virtual string WebViewLink { get; set; }

Property Value

string

WritersCanShare

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

public virtual bool? WritersCanShare { get; set; }

Property Value

bool?