File class
The metadata for a file.
Some resource methods (such as files.update
) require a fileId
. Use the
files.list
method to retrieve the ID for a file.
Constructors
-
File({Map<
String, String?> ? appProperties, FileCapabilities? capabilities, FileContentHints? contentHints, List<ContentRestriction> ? contentRestrictions, bool? copyRequiresWriterPermission, DateTime? createdTime, String? description, String? driveId, bool? explicitlyTrashed, Map<String, String> ? exportLinks, String? fileExtension, String? folderColorRgb, String? fullFileExtension, bool? hasAugmentedPermissions, bool? hasThumbnail, String? headRevisionId, String? iconLink, String? id, FileImageMediaMetadata? imageMediaMetadata, bool? isAppAuthorized, String? kind, FileLabelInfo? labelInfo, User? lastModifyingUser, String? md5Checksum, String? mimeType, bool? modifiedByMe, DateTime? modifiedByMeTime, DateTime? modifiedTime, String? name, String? originalFilename, bool? ownedByMe, List<User> ? owners, List<String> ? parents, List<String> ? permissionIds, List<Permission> ? permissions, Map<String, String?> ? properties, String? quotaBytesUsed, String? resourceKey, String? sha1Checksum, String? sha256Checksum, User? sharingUser, FileShortcutDetails? shortcutDetails, String? size, List<String> ? spaces, bool? starred, String? teamDriveId, String? thumbnailLink, String? thumbnailVersion, bool? trashed, DateTime? trashedTime, User? trashingUser, String? version, FileVideoMediaMetadata? videoMediaMetadata, bool? viewedByMe, DateTime? viewedByMeTime, bool? viewersCanCopyContent, String? webContentLink, String? webViewLink, }) - File.fromJson(Map json_)
Properties
-
appProperties
↔ Map<
String, String?> ? -
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.
getter/setter pair
- capabilities ↔ FileCapabilities?
-
Capabilities the current user has on this file.
getter/setter pair
- contentHints ↔ FileContentHints?
-
Additional information about the content of the file.
getter/setter pair
-
contentRestrictions
↔ List<
ContentRestriction> ? -
Restrictions for accessing the content of the file.
getter/setter pair
- copyRequiresWriterPermission ↔ bool?
-
Whether the options to copy, print, or download this file, should be
disabled for readers and commenters.
getter/setter pair
- createdTime ↔ DateTime?
-
The time at which the file was created (RFC 3339 date-time).
getter/setter pair
- description ↔ String?
-
A short description of the file.
getter/setter pair
- driveId ↔ String?
-
ID of the shared drive the file resides in.
getter/setter pair
- explicitlyTrashed ↔ bool?
-
Whether the file has been explicitly trashed, as opposed to recursively
trashed from a parent folder.
getter/setter pair
-
exportLinks
↔ Map<
String, String> ? -
Links for exporting Docs Editors files to specific formats.
getter/setter pair
- fileExtension ↔ String?
-
The final component of
fullFileExtension
.getter/setter pair - folderColorRgb ↔ String?
-
The color for a folder or a shortcut to a folder as an RGB hex string.
getter/setter pair
- fullFileExtension ↔ String?
-
The full file extension extracted from the
name
field.getter/setter pair - hasAugmentedPermissions ↔ bool?
-
Whether there are permissions directly on this file.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasThumbnail ↔ bool?
-
Whether this file has a thumbnail.
getter/setter pair
- headRevisionId ↔ String?
-
The ID of the file's head revision.
getter/setter pair
- iconLink ↔ String?
-
A static, unauthenticated link to the file's icon.
getter/setter pair
- id ↔ String?
-
The ID of the file.
getter/setter pair
- imageMediaMetadata ↔ FileImageMediaMetadata?
-
Additional metadata about image media, if available.
getter/setter pair
- isAppAuthorized ↔ bool?
-
Whether the file was created or opened by the requesting app.
getter/setter pair
- kind ↔ String?
-
Identifies what kind of resource this is.
getter/setter pair
- labelInfo ↔ FileLabelInfo?
-
An overview of the labels on the file.
getter/setter pair
- lastModifyingUser ↔ User?
-
The last user to modify the file.
getter/setter pair
-
Contains details about the link URLs that clients are using to refer to
this item.
getter/setter pair
- md5Checksum ↔ String?
-
The MD5 checksum for the content of the file.
getter/setter pair
- mimeType ↔ String?
-
The MIME type of the file.
getter/setter pair
- modifiedByMe ↔ bool?
-
Whether the file has been modified by this user.
getter/setter pair
- modifiedByMeTime ↔ DateTime?
-
The last time the file was modified by the user (RFC 3339 date-time).
getter/setter pair
- modifiedTime ↔ DateTime?
-
he last time the file was modified by anyone (RFC 3339 date-time).
getter/setter pair
- name ↔ String?
-
The name of the file.
getter/setter pair
- originalFilename ↔ String?
-
The original filename of the uploaded content if available, or else the
original value of the
name
field.getter/setter pair - ownedByMe ↔ bool?
-
Whether the user owns the file.
getter/setter pair
-
owners
↔ List<
User> ? -
The owner of this file.
getter/setter pair
-
parents
↔ List<
String> ? -
The IDs of the parent folders which contain the file.
getter/setter pair
-
permissionIds
↔ List<
String> ? -
List of permission IDs for users with access to this file.
getter/setter pair
-
permissions
↔ List<
Permission> ? -
The full list of permissions for the file.
getter/setter pair
-
properties
↔ Map<
String, String?> ? -
A collection of arbitrary key-value pairs which are visible to all apps.
Entries with null values are cleared in update and copy requests.
getter/setter pair
- quotaBytesUsed ↔ String?
-
The number of storage quota bytes used by the file.
getter/setter pair
- resourceKey ↔ String?
-
A key needed to access the item via a shared link.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sha1Checksum ↔ String?
-
The SHA1 checksum associated with this file, if available.
getter/setter pair
- sha256Checksum ↔ String?
-
The SHA256 checksum associated with this file, if available.
getter/setter pair
-
Whether the file has been shared.
getter/setter pair
-
The time at which the file was shared with the user, if applicable (RFC
3339 date-time).
getter/setter pair
-
The user who shared the file with the requesting user, if applicable.
getter/setter pair
- shortcutDetails ↔ FileShortcutDetails?
-
Shortcut file details.
getter/setter pair
- size ↔ String?
-
Size in bytes of blobs and first party editor files.
getter/setter pair
-
spaces
↔ List<
String> ? -
The list of spaces which contain the file.
getter/setter pair
- starred ↔ bool?
-
Whether the user has starred the file.
getter/setter pair
- teamDriveId ↔ String?
-
Deprecated: Output only.
getter/setter pair
- thumbnailLink ↔ String?
-
A short-lived link to the file's thumbnail, if available.
getter/setter pair
- thumbnailVersion ↔ String?
-
The thumbnail version for use in thumbnail cache invalidation.
getter/setter pair
- trashed ↔ bool?
-
Whether the file has been trashed, either explicitly or from a trashed
parent folder.
getter/setter pair
- trashedTime ↔ DateTime?
-
The time that the item was trashed (RFC 3339 date-time).
getter/setter pair
- trashingUser ↔ User?
-
If the file has been explicitly trashed, the user who trashed it.
getter/setter pair
- version ↔ String?
-
A monotonically increasing version number for the file.
getter/setter pair
- videoMediaMetadata ↔ FileVideoMediaMetadata?
-
Additional metadata about video media.
getter/setter pair
- viewedByMe ↔ bool?
-
Whether the file has been viewed by this user.
getter/setter pair
- viewedByMeTime ↔ DateTime?
-
The last time the file was viewed by the user (RFC 3339 date-time).
getter/setter pair
- viewersCanCopyContent ↔ bool?
-
Deprecated: Use
copyRequiresWriterPermission
instead.getter/setter pair - webContentLink ↔ String?
-
A link for downloading the content of the file in a browser.
getter/setter pair
- webViewLink ↔ String?
-
A link for opening the file in a relevant Google editor or viewer in a
browser.
getter/setter pair
-
Whether users with only
writer
permission can modify the file's permissions.getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited