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? enforceSingleParent, bool? ignoreDefaultVisibility, String? includeLabels, String? includePermissionsForView, bool? keepRevisionForever, String? ocrLanguage, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields}) Future<File>
Creates a copy of a file and applies any requested updates with patch semantics.
create(File request, {bool? enforceSingleParent, bool? ignoreDefaultVisibility, String? includeLabels, String? includePermissionsForView, bool? keepRevisionForever, String? ocrLanguage, bool? supportsAllDrives, bool? supportsTeamDrives, bool? useContentAsIndexableText, String? $fields, UploadOptions uploadOptions = commons.UploadOptions.defaultOptions, Media? uploadMedia}) Future<File>
Creates a new 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? count, String? space, String? type, String? $fields}) Future<GeneratedIds>
Generates a set of file IDs which can be provided in create or copy requests.
get(String fileId, {bool? acknowledgeAbuse, String? includeLabels, String? includePermissionsForView, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields, DownloadOptions downloadOptions = commons.DownloadOptions.metadata}) Future<Object>
Gets a file's metadata or content by ID.
list({String? corpora, String? corpus, String? driveId, bool? includeItemsFromAllDrives, String? includeLabels, String? includePermissionsForView, bool? includeTeamDriveItems, String? orderBy, int? pageSize, String? pageToken, 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
toString() String
A string representation of this object.
inherited
update(File request, String fileId, {String? addParents, bool? enforceSingleParent, String? includeLabels, String? includePermissionsForView, bool? keepRevisionForever, String? ocrLanguage, String? removeParents, bool? supportsAllDrives, bool? supportsTeamDrives, 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, bool? supportsAllDrives, bool? supportsTeamDrives, String? $fields}) Future<Channel>
Subscribes to changes to a file.

Operators

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