emptyTrash method
Permanently deletes all of the user's trashed files.
Request parameters:
driveId - If set, empties the trash of the provided shared drive.
enforceSingleParent - Deprecated: If an item is not in a shared drive
and its last parent is deleted but the item itself is not, the item is
placed under its owner's root.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<void> emptyTrash({
core.String? driveId,
core.bool? enforceSingleParent,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'driveId': ?driveId == null ? null : [driveId],
'enforceSingleParent': ?enforceSingleParent == null
? null
: ['${enforceSingleParent}'],
'fields': ?$fields == null ? null : [$fields],
};
const url_ = 'files/trash';
await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
downloadOptions: null,
);
}