OptimizeStorage class

Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted

Inheritance

Constructors

OptimizeStorage({String? extra, int? client_id, int53? size, int32? ttl, int32? count, int32? immunity_delay, vector<FileType>? file_types, vector<int53>? chat_ids, vector<int53>? exclude_chat_ids, Bool? return_deleted_file_statistics, int32? chat_limit})
OptimizeStorage.fromMap(Map<String, dynamic> map)

Properties

chat_ids vector<int53>?
If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos)
getter/setter pair
chat_limit int32?
Same as in getStorageStatistics. Affects only returned statistics
getter/setter pair
client_id int?
TDLib client id; maps to the field @client_id.
getter/setter pairinherited
count int32?
Limit on the total number of files after deletion. Pass -1 to use the default limit
getter/setter pair
exclude_chat_ids vector<int53>?
If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos)
getter/setter pair
extra String?
Matches requests with responses; maps to the field @extra.
getter/setter pairinherited
file_types vector<FileType>?
If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
immunity_delay int32?
The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value
getter/setter pair
return_deleted_file_statistics Bool?
Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int53?
Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit
getter/setter pair
tdReturnType String
The return type as String for this function. Currently not used.
no setteroverride
tdType String
JSON object type; maps to the field @type.
no setteroverride
ttl int32?
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({dynamic skipNulls = true}) String
Serialize a Td instance to a JSON string. If skipNulls is true the fields with null values are not serialized.
inherited
toMap({dynamic skipNulls = true}) Map<String, dynamic>
Create a Map from a Td instance.
override
toString({dynamic skipNulls = false}) String
A string representation of this object.
inherited

Operators

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