OptimizeStorage class
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
Returns StorageStatistics.
- Inheritance
- Available Extensions
Constructors
-
OptimizeStorage({required int size, required int ttl, required int count, required int immunity_delay, required List<
FileType> file_types, required List<int> chat_ids, required List<int> exclude_chat_ids, required bool return_deleted_file_statistics, required int chat_limit, int? extra, int? clientId}) - Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted
Properties
-
chat_ids
↔ List<
int> -
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).
read / write
- chat_limit ↔ int
-
Same as in getStorageStatistics. Affects only returned statistics.
read / write
- clientId ↔ int?
-
TDLib client instance identifier, for which the response was received.
read / writeoverride
- count ↔ int
-
Limit on the total number of files after deletion. Pass -1 to use the default limit.
read / write
-
exclude_chat_ids
↔ List<
int> -
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).
read / write
- extra ↔ int?
-
Request identifier. Must be non-zero.
read / writeoverride
-
file_types
↔ List<
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.
read / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- immunity_delay ↔ int
-
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
- 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.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- size ↔ int
-
Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.
read / write
- ttl ↔ int
-
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Object to Map serializer
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMap(
Map< String, dynamic> ? _map) → OptimizeStorage? -
Construct from Map.
override
Constants
- CONSTRUCTOR → const String
-
@type
"optimizeStorage"