FilesResource class

Constructors

FilesResource(ApiRequester client)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy(File request, String fileId, {bool? convert, bool? enforceSingleParent, String? includeLabels, String? includePermissionsForView, bool? ocr, String? ocrLanguage, bool? pinned, bool? supportsAllDrives, bool? supportsTeamDrives, String? timedTextLanguage, String? timedTextTrackName, String? visibility, String? $fields}) Future<File>
Creates a copy of the specified file.
delete(String fileId, {bool? enforceSingleParent, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields}) Future<void>
Permanently deletes a file owned by the user without moving it to the trash.
emptyTrash({String? driveId, bool? enforceSingleParent, String? $fields}) Future<void>
Permanently deletes all of the user's trashed files.
export(String fileId, String mimeType, {String? $fields, DownloadOptions downloadOptions = commons.DownloadOptions.metadata}) Future<Media?>
Exports a Google Workspace document to the requested MIME type and returns exported byte content.
generateIds({int? maxResults, String? space, String? type, String? $fields}) Future<GeneratedIds>
Generates a set of file IDs which can be provided in insert or copy requests.
get(String fileId, {bool? acknowledgeAbuse, String? includeLabels, String? includePermissionsForView, String? projection, String? revisionId, bool? supportsAllDrives, bool? supportsTeamDrives, bool? updateViewedDate, String? $fields, DownloadOptions downloadOptions = commons.DownloadOptions.metadata}) Future<Object>
Gets a file's metadata or content by ID.
insert(File request, {bool? convert, bool? enforceSingleParent, String? includeLabels, String? includePermissionsForView, bool? ocr, String? ocrLanguage, bool? pinned, bool? supportsAllDrives, bool? supportsTeamDrives, String? timedTextLanguage, String? timedTextTrackName, bool? useContentAsIndexableText, String? visibility, String? $fields, UploadOptions uploadOptions = commons.UploadOptions.defaultOptions, Media? uploadMedia}) Future<File>
Inserts a new file.
list({String? corpora, String? corpus, String? driveId, bool? includeItemsFromAllDrives, String? includeLabels, String? includePermissionsForView, bool? includeTeamDriveItems, int? maxResults, String? orderBy, String? pageToken, String? projection, String? q, String? spaces, bool? supportsAllDrives, bool? supportsTeamDrives, String? teamDriveId, String? $fields}) Future<FileList>
Lists the user's files.
listLabels(String fileId, {int? maxResults, String? pageToken, String? $fields}) Future<LabelList>
Lists the labels on a file.
modifyLabels(ModifyLabelsRequest request, String fileId, {String? $fields}) Future<ModifyLabelsResponse>
Modifies the set of labels applied to a file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(File request, String fileId, {String? addParents, bool? convert, bool? enforceSingleParent, String? includeLabels, String? includePermissionsForView, String? modifiedDateBehavior, bool? newRevision, bool? ocr, String? ocrLanguage, bool? pinned, String? removeParents, bool? setModifiedDate, bool? supportsAllDrives, bool? supportsTeamDrives, String? timedTextLanguage, String? timedTextTrackName, bool? updateViewedDate, bool? useContentAsIndexableText, String? $fields}) Future<File>
Updates a file's metadata and/or content.
toString() String
A string representation of this object.
inherited
touch(String fileId, {String? includeLabels, String? includePermissionsForView, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields}) Future<File>
Set the file's updated time to the current server time.
trash(String fileId, {String? includeLabels, String? includePermissionsForView, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields}) Future<File>
Moves a file to the trash.
untrash(String fileId, {String? includeLabels, String? includePermissionsForView, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields}) Future<File>
Restores a file from the trash.
update(File request, String fileId, {String? addParents, bool? convert, bool? enforceSingleParent, String? includeLabels, String? includePermissionsForView, String? modifiedDateBehavior, bool? newRevision, bool? ocr, String? ocrLanguage, bool? pinned, String? removeParents, bool? setModifiedDate, bool? supportsAllDrives, bool? supportsTeamDrives, String? timedTextLanguage, String? timedTextTrackName, bool? updateViewedDate, bool? useContentAsIndexableText, String? $fields, UploadOptions uploadOptions = commons.UploadOptions.defaultOptions, Media? uploadMedia}) Future<File>
Updates a file's metadata and/or content.
watch(Channel request, String fileId, {bool? acknowledgeAbuse, String? includeLabels, String? includePermissionsForView, String? projection, String? revisionId, bool? supportsAllDrives, bool? supportsTeamDrives, bool? updateViewedDate, String? $fields}) Future<Channel>
Subscribes to changes to a file.

Operators

operator ==(Object other) bool
The equality operator.
inherited