RtfFileComparator {verifyr2} | R Documentation |
RtfFileComparator.R
Description
RtfFileComparator.R
RtfFileComparator.R
Details
Specialiced comparator for RTF file comparison. This comparator contains the custom handling for handling only RTF content part for the comparison.
Super classes
verifyr2::FileComparator
-> verifyr2::BinaryFileComparator
-> verifyr2::TxtFileComparator
-> verifyr2::TxtWithImagesFileComparator
-> RtfFileComparator
Methods
Public methods
Inherited methods
verifyr2::FileComparator$vrf_add_debug()
verifyr2::FileComparator$vrf_add_debug_files()
verifyr2::FileComparator$vrf_close_debug()
verifyr2::FileComparator$vrf_details()
verifyr2::FileComparator$vrf_open_debug()
verifyr2::FileComparator$vrf_option_value()
verifyr2::FileComparator$vrf_summary()
verifyr2::TxtFileComparator$vrf_contents_inner()
verifyr2::TxtFileComparator$vrf_details_supported()
verifyr2::TxtWithImagesFileComparator$hex2raw()
verifyr2::TxtWithImagesFileComparator$initialize()
verifyr2::TxtWithImagesFileComparator$vrf_details_inner()
verifyr2::TxtWithImagesFileComparator$vrf_summary_inner()
Method vrf_contents()
Method for getting the single file contents for the comparison. The method returns the file contents in two separate vectors inside a list. The first vector is the file contents and the second one is the file contents with the rows matching the omit string excluded. This method can be overwritten by more specialized comparator classes. This method is intended to be called only by the comparator classes in the processing and shouldn't be called directly by the user.
For RtfComparator, only the RTF file content part is returned for comparison.
Usage
RtfFileComparator$vrf_contents(file, config, omit)
Arguments
file
file for which to get the contents
config
configuration values
omit
string pattern to omit from the comparison
Method vrf_images()
"Abstract" method for getting the raw image hex vector array from the given source file.
Usage
RtfFileComparator$vrf_images(file, config)
Arguments
file
file for which to get the embedded image details
config
configuration values
Method clone()
The objects of this class are cloneable with this method.
Usage
RtfFileComparator$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
# The normal way for creating a comparator would be to call the generic
# factory method verifyr2::create_comparator that will automatically create
# the correct comparator instance based on the file types.
file1 <- 'my_file1.rtf'
file2 <- 'my_file2.rtf'
comparator <- verifyr2::create_comparator(file1, file2)
# If needed, an explicit comparator can be created as well.
file1 <- 'my_file1.rtf'
file2 <- 'my_file2.rft'
comparator <- RtfFileComparator$new(file1, file2)