mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 01:42:09 +01:00
141 lines
3.5 KiB
XML
141 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xml:id="function.xdiff-file-patch-binary" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>xdiff_file_patch_binary</refname>
|
|
<refpurpose>Alias de xdiff_file_bpatch</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>xdiff_file_patch_binary</methodname>
|
|
<methodparam><type>string</type><parameter>file</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Patche le fichier <parameter>file</parameter> avec un
|
|
<parameter>patch</parameter> binaire et enregistre le résultat dans le fichier
|
|
<parameter>dest</parameter>. Cette fonction accepte les patchs créés avec
|
|
la fonction <function>xdiff_file_bdiff</function> ou la fonction
|
|
<function>xdiff_file_rabdiff</function> ou leur équivalent sous forme de chaînes.
|
|
</para>
|
|
<para>
|
|
Depuis la version 1.5.0, cette fonction est un alias de la fonction
|
|
<function>xdiff_file_bpatch</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>file</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le fichier original.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>patch</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le Patch binaire.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>dest</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le chemin vers le fichier résultat.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>xdiff_file_patch_binary</function></title>
|
|
<para>
|
|
Le code suivant applique un diff binaire à un fichier.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$old_version = 'archive-1.0.tgz';
|
|
$patch = 'archive.bpatch';
|
|
|
|
$result = xdiff_file_patch_binary($old_version, $patch, 'archive-1.1.tgz');
|
|
if ($result) {
|
|
echo "File patched";
|
|
} else {
|
|
echo "File couldn't be patched";
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Les deux fichiers (le fichier et le patch) seront chargés en mémoire ; assurez-vous d'avoir
|
|
défini <literal>memory_limit</literal> à une valeur assez élevée.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>xdiff_string_patch_binary</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
|
|
-->
|