PHP - xdiff file_patch_binary() Function
xdiff_file_patch_binary() function is an alias of xdiff_file_bpatch().
Syntax
bool xdiff_file_patch_binary( string $file, string $patch, string $dest )
xdiff_file_patch_binary() function patches a file with binary patch and store the result in a file dest. This function accept patches created both via xdiff_file_bdiff() or xdiff_file_rabdiff() functions or their string counterparts.
xdiff_file_patch_binary() function can return true on success or false on failure.
Example
<?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";
}
?>
php_function_reference.htm
Advertisements