mirror of
https://github.com/php/doc-ru.git
synced 2026-03-26 08:42:13 +01:00
102 lines
3.0 KiB
XML
102 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: f03806fcd8fe03a0501bd40b6e3939ff6589a1d2 Maintainer: rjhdby Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<refentry xml:id="pharfileinfo.getcompressedsize" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>PharFileInfo::getCompressedSize</refname>
|
||
<refpurpose>Получить реальный занимаемый файлом размер на диске с учётом сжатия</refpurpose>
|
||
</refnamediv>
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis role="PharFileInfo">
|
||
<modifier>public</modifier> <type>int</type><methodname>PharFileInfo::getCompressedSize</methodname>
|
||
<void/>
|
||
</methodsynopsis>
|
||
|
||
<para>
|
||
Возвращает реально занимаемое файлом место с учётом сжатия. Для несжатого файла
|
||
вернётся такое же значение, что и с помощью <function>filesize</function>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
&no.function.parameters;
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Размер файла в байтах.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>Пример использования <function>PharFileInfo::getCompressedSize</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
try {
|
||
$p = new Phar('/path/to/my.phar', 0, 'my.phar');
|
||
$p['myfile.txt'] = 'hi';
|
||
$file = $p['myfile.txt'];
|
||
echo $file->getCompressedSize();
|
||
} catch (Exception $e) {
|
||
echo 'Операции записи на my.phar завершились ошибкой: ', $e;
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
&example.outputs;
|
||
<screen>
|
||
<![CDATA[
|
||
2
|
||
]]>
|
||
</screen>
|
||
</example>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><function>PharFileInfo::isCompressed</function></member>
|
||
<member><function>PharFileInfo::decompress</function></member>
|
||
<member><function>PharFileInfo::compress</function></member>
|
||
<member><function>Phar::canCompress</function></member>
|
||
<member><function>Phar::isCompressed</function></member>
|
||
<member><function>Phar::compress</function></member>
|
||
<member><function>Phar::decompress</function></member>
|
||
<member><function>Phar::getSupportedCompression</function></member>
|
||
<member><function>Phar::decompressFiles</function></member>
|
||
<member><function>Phar::compressFiles</function></member>
|
||
</simplelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
</refentry>
|
||
<!-- Keep this comment at the end of the file
|
||
Local variables:
|
||
mode: sgml
|
||
sgml-omittag:t
|
||
sgml-shorttag:t
|
||
sgml-minimize-attributes:nil
|
||
sgml-always-quote-attributes:t
|
||
sgml-indent-step:1
|
||
sgml-indent-data:t
|
||
indent-tabs-mode:nil
|
||
sgml-parent-document:nil
|
||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||
sgml-exposed-tags:nil
|
||
sgml-local-catalogs:nil
|
||
sgml-local-ecat-files:nil
|
||
End:
|
||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
vim: et tw=78 syn=sgml
|
||
vi: ts=1 sw=1
|
||
-->
|