Inherits Function.
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
Returns object_ptr<StorageStatistics>.
Public Fields | |
| int53 | size_ |
| Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit. | |
| int32 | 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. | |
| int32 | count_ |
| Limit on the total number of files after deletion. Pass -1 to use the default limit. | |
| int32 | immunity_delay_ |
| 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. | |
| array< object_ptr< FileType > > | file_types_ |
| If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted. | |
| array< int53 > | chat_ids_ |
| 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). | |
| array< int53 > | exclude_chat_ids_ |
| 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). | |
| bool | return_deleted_file_statistics_ |
| Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics. | |
| int32 | chat_limit_ |
| Same as in getStorageStatistics. Affects only returned statistics. | |
Public Types | |
| using | ReturnType = object_ptr< storageStatistics > |
| Typedef for the type returned by the function. | |
Public Instance Methods | |
| optimizeStorage () | |
| optimizeStorage (int53 size_, int32 ttl_, int32 count_, int32 immunity_delay_, array< object_ptr< FileType >> &&file_types_, array< int53 > &&chat_ids_, array< int53 > &&exclude_chat_ids_, bool return_deleted_file_statistics_, int32 chat_limit_) | |
| void | store (TlStorerToString &s, const char *field_name) const final |
Public Instance Methods inherited from TlObject | |
| virtual void | store (TlStorerUnsafe &s) const |
| virtual void | store (TlStorerCalcLength &s) const |
| TlObject ()=default | |
| TlObject (const TlObject &)=delete | |
| TlObject & | operator= (const TlObject &)=delete |
| TlObject (TlObject &&)=default | |
| TlObject & | operator= (TlObject &&)=default |
| virtual | ~TlObject ()=default |
Static Public Attributes | |
| static const std::int32_t | ID = 853186759 |
| Identifier uniquely determining a type of the object. | |
| optimizeStorage | ( | ) |
Default constructor for a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
Returns object_ptr<StorageStatistics>.
| optimizeStorage | ( | int53 | size_, |
| int32 | ttl_, | ||
| int32 | count_, | ||
| int32 | immunity_delay_, | ||
| array< object_ptr< FileType >> && | file_types_, | ||
| array< int53 > && | chat_ids_, | ||
| array< int53 > && | exclude_chat_ids_, | ||
| bool | return_deleted_file_statistics_, | ||
| int32 | chat_limit_ | ||
| ) |
Creates a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
Returns object_ptr<StorageStatistics>.
| [in] | size_ | Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit. |
| [in] | 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. |
| [in] | count_ | Limit on the total number of files after deletion. Pass -1 to use the default limit. |
| [in] | immunity_delay_ | 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. |
| [in] | file_types_ | If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted. |
| [in] | chat_ids_ | 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). |
| [in] | exclude_chat_ids_ | 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). |
| [in] | return_deleted_file_statistics_ | Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics. |
| [in] | chat_limit_ | Same as in getStorageStatistics. Affects only returned statistics. |
|
finalvirtual |