public static class TdApi.OptimizeStorage extends TdApi.Function
Returns StorageStatistics
TdApi.Function.Constructors
Modifier and Type | Field and Description |
---|---|
long[] |
chatIds
If non-empty, only files from the given chats are considered.
|
int |
chatLimit
Same as in getStorageStatistics.
|
static int |
CONSTRUCTOR
Identifier uniquely determining type of the object.
|
int |
count
Limit on the total count of files after deletion.
|
long[] |
excludeChatIds
If non-empty, files from the given chats are excluded.
|
TdApi.FileType[] |
fileTypes
If non-empty, only files with the given types are considered.
|
int |
immunityDelay
The amount of time after the creation of a file during which it can't be deleted, in seconds.
|
boolean |
returnDeletedFileStatistics
Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics.
|
long |
size
Limit on the total size of files after deletion, in bytes.
|
int |
ttl
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems).
|
Constructor and Description |
---|
OptimizeStorage()
Default constructor for a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics.
|
OptimizeStorage(long size,
int ttl,
int count,
int immunityDelay,
TdApi.FileType[] fileTypes,
long[] chatIds,
long[] excludeChatIds,
boolean returnDeletedFileStatistics,
int chatLimit)
Creates a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics.
|
Modifier and Type | Method and Description |
---|---|
int |
getConstructor() |
toString
public long size
public int ttl
public int count
public int immunityDelay
public TdApi.FileType[] fileTypes
public long[] chatIds
public long[] excludeChatIds
public boolean returnDeletedFileStatistics
public int chatLimit
public static final int CONSTRUCTOR
public OptimizeStorage()
Returns StorageStatistics
public OptimizeStorage(long size, int ttl, int count, int immunityDelay, TdApi.FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, boolean returnDeletedFileStatistics, int chatLimit)
Returns StorageStatistics
size
- Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.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.count
- Limit on the total count of files after deletion. Pass -1 to use the default limit.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.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
- 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
- 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
- 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
- Same as in getStorageStatistics. Affects only returned statistics.public int getConstructor()
getConstructor
in class TdApi.Function