Files
doc-fr/reference/phar/PharFileInfo/getCompressedSize.xml
2021-06-12 07:27:28 +01:00

105 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: f5a5f5ae75cf140bd3dd65da52b70f6236b0e131 Maintainer: gui Status: ready -->
<!-- Reviewed: no -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.getcompressedsize">
<refnamediv>
<refname>PharFileInfo::getCompressedSize</refname>
<refpurpose>Retourne la taille actuelle (avec compression) du fichier au sein de l'archive Phar</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>PharFileInfo::getCompressedSize</methodname>
<void/>
</methodsynopsis>
<para>
Cette méthode retourne la taille du fichier au sein de l'archive Phar. Les fichiers non compressés
retourneront la même valeur avec getCompressedSize qu'avec <function>filesize</function>
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
La taille en octets du fichier au sein de l'archive Phar sur le disque.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Un exemple avec <function>PharFileInfo::getCompressedSize</function></title>
<programlisting role="php">
<![CDATA[
<?php
try {
$p = new Phar('/chemin/vers/mon.phar', 0, 'mon.phar');
$p['monfichier.txt'] = 'salut';
$file = $p['monfichier.txt'];
echo $file->getCompressedSize();
} catch (Exception $e) {
echo 'L'écriture de mon.phar a échoué : ', $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
-->