<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision$ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry xml:id="function.xdiff-file-patch-binary" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>xdiff_file_patch_binary</refname>
  <refpurpose>Alias of 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>
   Patches a <parameter>file</parameter> with a binary
   <parameter>patch</parameter> and stores the result in a file <parameter>dest</parameter>. 
   This function accepts patches created both via <function>xdiff_file_bdiff</function> 
   or <function>xdiff_file_rabdiff</function> functions or their string counterparts.
  </para> 
  <para>
   Starting with version 1.5.0 this function is an alias of <function>xdiff_file_bpatch</function>.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>file</parameter></term>
     <listitem>
      <para>
       The original file.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>patch</parameter></term>
     <listitem>
      <para>
       The binary patch file.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>dest</parameter></term>
     <listitem>
      <para>
       Path of the resulting file.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title><function>xdiff_file_patch_binary</function> example</title>
    <para>
     The following code applies binary diff to a file.
    </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>
    Both files (<parameter>file</parameter> and <parameter>patch</parameter>)
    will be loaded into memory so ensure that your memory_limit is set high
    enough.
   </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
-->