- Enclosing class:
- TdApi
Optimizes storage usage, i.e. deletes
some files and returns new storage
usage statistics. Secret thumbnails
can't be deleted.
Returns
StorageStatistics
-
Field Summary
Modifier and TypeFieldDescriptionlong[]
If non-empty, only files from the given chats are considered.int
Same as in getStorageStatistics.static final int
int
Limit on the total number of files after deletion.long[]
If non-empty, files from the given chats are excluded.If non-empty, only files with the given types are considered.int
The amount of time after the creation of a file during which it can't be deleted, in seconds.boolean
Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics.long
Limit on the total size of files after deletion, in bytes.int
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). -
Constructor Summary
ConstructorDescriptionOptimizes storage usage, i.e.OptimizeStorage
(long size, int ttl, int count, int immunityDelay, TdApi.FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, boolean returnDeletedFileStatistics, int chatLimit) Optimizes storage usage, i.e.OptimizeStorage
(DataInput input) Optimizes storage usage, i.e. -
Method Summary
Methods inherited from class it.tdlight.jni.TdApi.Function
toString
Methods inherited from class it.tdlight.jni.TdApi.Object
serialize
-
Field Details
-
size
public long sizeLimit on the total size of files after deletion, in bytes. Pass -1 to use the default limit. -
ttl
public int ttlLimit 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. -
count
public int countLimit on the total number of files after deletion. Pass -1 to use the default limit. -
immunityDelay
public int immunityDelayThe 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. -
fileTypes
If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted. -
chatIds
public long[] chatIdsIf 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). -
excludeChatIds
public long[] excludeChatIdsIf 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). -
returnDeletedFileStatistics
public boolean returnDeletedFileStatisticsPass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics. -
chatLimit
public int chatLimitSame as in getStorageStatistics. Affects only returned statistics. -
CONSTRUCTOR
public static final int CONSTRUCTOR- See Also:
-
-
Constructor Details
-
OptimizeStorage
public OptimizeStorage()Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted. ReturnsStorageStatistics
-
OptimizeStorage
public OptimizeStorage(long size, int ttl, int count, int immunityDelay, TdApi.FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, boolean returnDeletedFileStatistics, int chatLimit) Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted. ReturnsStorageStatistics
- Parameters:
size
- long Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.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.count
- int Limit on the total number of files after deletion. Pass -1 to use the default limit.immunityDelay
- 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.fileTypes
- 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.chatIds
- long[] 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).excludeChatIds
- long[] 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).returnDeletedFileStatistics
- boolean Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.chatLimit
- int Same as in getStorageStatistics. Affects only returned statistics.
-
OptimizeStorage
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted. ReturnsStorageStatistics
- Throws:
IOException
-
-
Method Details
-
getConstructor
public int getConstructor()- Specified by:
getConstructor
in classTdApi.Object
-
serialize
- Specified by:
serialize
in classTdApi.Object
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-