1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-26 08:42:13 +01:00
Files
archived-doc-ru/reference/xdiff/functions/xdiff-file-diff-binary.xml
2022-09-08 09:35:15 +03:00

131 lines
3.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: bc0556b65588379cb86511d5a0ff8ab4684e1d33 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.xdiff-file-diff-binary" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xdiff_file_diff_binary</refname>
<refpurpose>&Alias; <function>xdiff_file_bdiff</function></refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_diff_binary</methodname>
<methodparam><type>string</type><parameter>old_file</parameter></methodparam>
<methodparam><type>string</type><parameter>new_file</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<para>
Создаёт файл бинарного патча сравнивая два файла. Эта функция работает,
как с бинарными, так и с текстовыми файлами. В дальнейшем, полученный патч
можно применить с помощью функций <function>xdiff_file_bpatch</function>.
</para>
<para>
Начиная с версии 1.5.0, эта функция является псевдонимом <function>xdiff_file_bdiff</function>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>old_file</parameter></term>
<listitem>
<para>
Путь к первому, "старому" файлу.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>new_file</parameter></term>
<listitem>
<para>
Путь ко второму, "новому" файлу.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>dest</parameter></term>
<listitem>
<para>
Путь результирующего файла патча. Он будет содержать
различия между старым и новым файлом в бинарном, человеконечитаемом.
</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_diff_binary</function></title>
<para>
Следующий код создаёт бинарный патч сравнивая два архива.
</para>
<programlisting role="php">
<![CDATA[
<?php
$old_version = 'my_script_1.0.tgz';
$new_version = 'my_script_1.1.tgz';
xdiff_file_diff_binary($old_version, $new_version, 'my_script.bdiff');
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
Оба файла будут загружены в память, так что убедитесь, что параметр
memory_limit настроен корректно.
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xdiff_file_bdiff</function></member>
<member><function>xdiff_file_bpatch</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
-->