Patchfile
from panda3d.core import Patchfile
- class Patchfile
Bases:
DTOOL_SUPER_BASE
Inheritance diagram
- __init__(*args, **kwargs)
- allow_multifile
- apply()
C++ Interface: apply(const Patchfile self, Filename patch_file, Filename file) apply(const Patchfile self, Filename patch_file, Filename orig_file, const Filename target_file)
- build()
C++ Interface: build(const Patchfile self, Filename file_orig, Filename file_new, Filename patch_name)
- /**
This implementation uses the “greedy differencing algorithm” described in
the masters thesis “Differential Compression: A Generalized Solution for
Binary Files” by Randal C. Burns (p.13). For an original file of size M and
a new file of size N, this algorithm is O(M) in space and O(M*N) (worst-
case) in time. return false on error
*/
- footprint_length
- getAllowMultifile()
C++ Interface: get_allow_multifile(const Patchfile self)
- /**
See set_allow_multifile().
*/
- getProgress()
C++ Interface: get_progress(Patchfile self)
- /**
Returns a value in the range 0..1, representing the amount of progress
through the patchfile, during a session.
*/
- getResultHash()
C++ Interface: get_result_hash(Patchfile self)
- /**
Returns the MD5 hash for the file after the patch has been applied.
*/
- getSourceHash()
C++ Interface: get_source_hash(Patchfile self)
- /**
Returns the MD5 hash for the source file.
*/
- get_allow_multifile()
C++ Interface: get_allow_multifile(const Patchfile self)
- /**
See set_allow_multifile().
*/
- get_progress()
C++ Interface: get_progress(Patchfile self)
- /**
Returns a value in the range 0..1, representing the amount of progress
through the patchfile, during a session.
*/
- get_result_hash()
C++ Interface: get_result_hash(Patchfile self)
- /**
Returns the MD5 hash for the file after the patch has been applied.
*/
- get_source_hash()
C++ Interface: get_source_hash(Patchfile self)
- /**
Returns the MD5 hash for the source file.
*/
- hasSourceHash()
C++ Interface: has_source_hash(Patchfile self)
- /**
Returns true if the MD5 hash for the source file is known. (Some early
versions of the patch file did not store this information.)
*/
- has_source_hash()
C++ Interface: has_source_hash(Patchfile self)
- /**
Returns true if the MD5 hash for the source file is known. (Some early
versions of the patch file did not store this information.)
*/
- initiate()
C++ Interface: initiate(const Patchfile self, const Filename patch_file, const Filename file) initiate(const Patchfile self, const Filename patch_file, const Filename orig_file, const Filename target_file)
- progress
- readHeader()
C++ Interface: read_header(const Patchfile self, const Filename patch_file)
- /**
Opens the patch file for reading, and gets the header information from the
file but does not begin to do any real work. This can be used to query the
data stored in the patch.
*/
- read_header()
C++ Interface: read_header(const Patchfile self, const Filename patch_file)
- /**
Opens the patch file for reading, and gets the header information from the
file but does not begin to do any real work. This can be used to query the
data stored in the patch.
*/
- result_hash
- run()
C++ Interface: run(const Patchfile self)
- /**
Perform one buffer’s worth of patching.
Returns one of the following values:
@li @c EU_ok : while patching
@li @c EU_success : when done
@li @c EU_error_abort : Patching has not been initiated
@li @c EU_error_file_invalid : file is corrupted
@li @c EU_error_invalid_checksum : incompatible patch file
@li @c EU_error_write_file_rename : could not rename file
*/
- setAllowMultifile()
C++ Interface: set_allow_multifile(const Patchfile self, bool allow_multifile)
- /**
If this flag is set true, the Patchfile will make a special case for
patching Panda Multifiles, if detected, and attempt to patch them on a
subfile-by-subfile basis. If this flag is false, the Patchfile will always
patch the file on a full-file basis.
This has effect only when building patches; it is not used for applying
patches.
*/
- set_allow_multifile()
C++ Interface: set_allow_multifile(const Patchfile self, bool allow_multifile)
- /**
If this flag is set true, the Patchfile will make a special case for
patching Panda Multifiles, if detected, and attempt to patch them on a
subfile-by-subfile basis. If this flag is false, the Patchfile will always
patch the file on a full-file basis.
This has effect only when building patches; it is not used for applying
patches.
*/
- set_footprint_length()
C++ Interface: set_footprint_length(const Patchfile self, int length)
- /**
*/
- source_hash