<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<divclass="inheritance"><ahref="TdApi.Object.html"title="class in it.tdlight.jni">it.tdlight.jni.TdApi.Object</a>
<divclass="inheritance"><ahref="TdApi.Function.html"title="class in it.tdlight.jni">it.tdlight.jni.TdApi.Function</a><<ahref="TdApi.StorageStatistics.html"title="class in it.tdlight.jni">TdApi.StorageStatistics</a>>
<dd><ahref="TdApi.html"title="class in it.tdlight.jni">TdApi</a></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public static final class </span><spanclass="element-name type-name-label">TdApi.OptimizeStorage</span>
<spanclass="extends-implements">extends <ahref="TdApi.Function.html"title="class in it.tdlight.jni">TdApi.Function</a><<ahref="TdApi.StorageStatistics.html"title="class in it.tdlight.jni">TdApi.StorageStatistics</a>></span></div>
<divclass="block">Optimizes storage usage, i.e. deletes some files and returns new
storage usage statistics. Secret thumbnails can't be deleted.
<p> Returns <ahref="TdApi.StorageStatistics.html"title="class in it.tdlight.jni"><code>StorageStatistics</code></a></p></div>
</section>
<sectionclass="summary">
<ulclass="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<sectionclass="field-summary"id="field-summary">
<h2>Field Summary</h2>
<divclass="caption"><span>Fields</span></div>
<divclass="summary-table three-column-summary">
<divclass="table-header col-first">Modifier and Type</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(java.io.DataInput)"class="member-name-link">OptimizeStorage</a><wbr>(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInput.html"title="class or interface in java.io"class="external-link">DataInput</a> input)</code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#equals(java.lang.Object)"class="member-name-link">equals</a><wbr>(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a> o)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#serialize(java.io.DataOutput)"class="member-name-link">serialize</a><wbr>(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataOutput.html"title="class or interface in java.io"class="external-link">DataOutput</a> output)</code></div>
<h3id="methods-inherited-from-class-it.tdlight.jni.TdApi.Function">Methods inherited from class it.tdlight.jni.<ahref="TdApi.Function.html"title="class in it.tdlight.jni">TdApi.Function</a></h3>
<h3id="methods-inherited-from-class-it.tdlight.jni.TdApi.Object">Methods inherited from class it.tdlight.jni.<ahref="TdApi.Object.html"title="class in it.tdlight.jni">TdApi.Object</a></h3>
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()"title="class or interface in java.lang"class="external-link">clone</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()"title="class or interface in java.lang"class="external-link">finalize</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
<divclass="block">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.</div>
<divclass="block">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.</div>
</section>
</li>
<li>
<sectionclass="detail"id="fileTypes">
<h3>fileTypes</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="TdApi.FileType.html"title="class in it.tdlight.jni">TdApi.FileType</a>[]</span> <spanclass="element-name">fileTypes</span></div>
<divclass="block">If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.</div>
<divclass="block">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).</div>
<divclass="block">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).</div>
<divclass="block">Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.</div>
<ahref="TdApi.FileType.html"title="class in it.tdlight.jni">TdApi.FileType</a>[] fileTypes,
long[] chatIds,
long[] excludeChatIds,
boolean returnDeletedFileStatistics,
int chatLimit)</span></div>
<divclass="block">Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
<p> Returns <ahref="TdApi.StorageStatistics.html"title="class in it.tdlight.jni"><code>StorageStatistics</code></a></p></div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>size</code> - Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.</dd>
<dd><code>ttl</code> - 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.</dd>
<dd><code>count</code> - Limit on the total number of files after deletion. Pass -1 to use the default limit.</dd>
<dd><code>immunityDelay</code> - 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.</dd>
<dd><code>fileTypes</code> - If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.</dd>
<dd><code>chatIds</code> - 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).</dd>
<dd><code>excludeChatIds</code> - 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).</dd>
<dd><code>returnDeletedFileStatistics</code> - Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.</dd>
<dd><code>chatLimit</code> - Same as in getStorageStatistics. Affects only returned statistics.
<p> Returns <ahref="TdApi.StorageStatistics.html"title="class in it.tdlight.jni"><code>StorageStatistics</code></a></p></dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">OptimizeStorage</span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInput.html"title="class or interface in java.io"class="external-link">DataInput</a> input)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
<p> Returns <ahref="TdApi.StorageStatistics.html"title="class in it.tdlight.jni"><code>StorageStatistics</code></a></p></div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>input</code> - Serialized input</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - the deserialization failed</dd>
<divclass="block"><spanclass="descfrm-type-label">Description copied from class: <code><ahref="TdApi.Object.html#getConstructor()">TdApi.Object</a></code></span></div>
<divclass="block">Returns an identifier uniquely determining type of the object.</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="TdApi.Object.html#getConstructor()">getConstructor</a></code> in class <code><ahref="TdApi.Object.html"title="class in it.tdlight.jni">TdApi.Object</a></code></dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">void</span> <spanclass="element-name">serialize</span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataOutput.html"title="class or interface in java.io"class="external-link">DataOutput</a> output)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Serialize the TDLib class</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="TdApi.Object.html#serialize(java.io.DataOutput)">serialize</a></code> in class <code><ahref="TdApi.Object.html"title="class in it.tdlight.jni">TdApi.Object</a></code></dd>
<dt>Parameters:</dt>
<dd><code>output</code> - output data stream</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - the serialization failed</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">boolean</span> <spanclass="element-name">equals</span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a> o)</span></div>
<dlclass="notes">
<dt>Overrides:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a></code> in class <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></code></dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a></code> in class <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footerrole="contentinfo">
<hr>
<pclass="legal-copy"><small>Copyright © 2023. All rights reserved.</small></p>