TxtFileComparator {verifyr2} | R Documentation |
TextFileComparator.R
Description
TextFileComparator.R
TextFileComparator.R
Details
Fallback comparator for text files without any specific definied comparator. This comparator contains the methods for doing basic comparisons on raw text contents.
Super classes
verifyr2::FileComparator
-> verifyr2::BinaryFileComparator
-> TxtFileComparator
Methods
Public methods
Inherited methods
verifyr2::FileComparator$initialize()
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::BinaryFileComparator$vrf_contents()
Method vrf_summary_inner()
Method for comparing the inner part for the details query. 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.
Usage
TxtFileComparator$vrf_summary_inner(config, omit)
Arguments
config
configuration values
omit
string pattern to omit from the comparison
Method vrf_details_inner()
Method for comparing the inner part for the details query. 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.
Usage
TxtFileComparator$vrf_details_inner(config, omit)
Arguments
config
configuration values
omit
string pattern to omit from the comparison
Method vrf_contents_inner()
Method for getting the inner part for the file contents query. 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.
Usage
TxtFileComparator$vrf_contents_inner(contents, config, omit)
Arguments
contents
file contents
config
configuration values
omit
string pattern to omit from the comparison
Method vrf_details_supported()
Inherited method for indicating whether detailed comparison is available with the current comparator. Returns an empty string if the comparator is is supported, otherwise a string that will be concatenated with the summary string.
Usage
TxtFileComparator$vrf_details_supported(config)
Arguments
config
configuration values
Method clone()
The objects of this class are cloneable with this method.
Usage
TxtFileComparator$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.txt'
file2 <- 'my_file2.txt'
comparator <- verifyr2::create_comparator(file1, file2)
# If needed, an explicit comparator can be created as well.
file1 <- 'my_file1.lst'
file2 <- 'my_file2.lst'
comparator <- TxtFileComparator$new(file1, file2)