OptimizeStorage class

Inheritance

Constructors

OptimizeStorage({int size, int ttl, int count, int immunityDelay, List<FileType> fileTypes, List<int> chatIds, List<int> excludeChatIds, bool returnDeletedFileStatistics, int chatLimit})
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted
OptimizeStorage.fromJson(Map<String, dynamic> json)
Parse from a json

Properties

chatIds List<int>
chatIds If not 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)
read / write
chatLimit int
chatLimit Same as in getStorageStatistics. Affects only returned statistics
read / write
count int
count Limit on the total count of files after deletion. Pass -1 to use the default limit
read / write
excludeChatIds List<int>
excludeChatIds If not 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)
read / write
extra ↔ dynamic
callback sign
read / write
fileTypes List<FileType>
fileTypes If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
immunityDelay int
immunityDelay 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
read / write
returnDeletedFileStatistics bool
returnDeletedFileStatistics Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int
size Limit on the total size of files after deletion. Pass -1 to use the default limit
read / write
ttl int
ttl 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
read / write

Methods

getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object. [...]
inherited

Operators

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

Constants

CONSTRUCTOR → const String
'optimizeStorage'