JVCL Help:TJvPatchFile.Patch

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Applies the specified patches to a file.


Pascal

 functionPatch(constPassword: string = ): Boolean;


Parameters

Parameters Description
const Password: string = Password to use when encrypting patch file contents.


Return Value

Boolean - True when patches in the Differences property are applied to the original file content.


Description

Patch is a Boolean function used to apply the patches in the Differences property to the contents of the original file specified in StartFile. Patch returns True when the Differences are successfully applied to the original file.
Patch reads and decrypts the contents of the Differences property using the value specified in the Password parameter. Password is the value used when creating the values in Differences using its' design-time property editor. Using a Password argument that is different than the value used to populate the Differences property will result in an unusable file after patches are applied.
Use StartFile to specify the file name with the content to be patched using the values in Differences.
Use EndFile and ChangeInFile to indicate where the patched contents of the file indicated in StartFile should be stored. When ChangeInFile contains False, the value in EndFile is used to create a file the patch file content is stored. When ChangeInFile contains False, patches in the Differences property overwrite the original contents of the file specified in StartFile.
Assign values to the Differences property, or load the values from a file, to indicate the actions to perform in the Patch method. Values in Differences must be in the specific format required by the TJvPatchFile component.
A design-time property editor is provided for the Differences property that can be used to create patches in the format required for use i the component. Patches for the specified files are encrypted using the Password provided at design-time.


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page