reVReports.data.check_files_match#

check_files_match(pattern, dir_1_path, dir_2_path)[source]#

Verify that the files in two folders match

Files are filtered by the specified pattern and the contents of the two folders are searched recursively. Only the names of the files and their relative paths within the folders are compared - contents of the files are not checked.

Parameters:
  • pattern (str) – File pattern used for filtering files in the specified folders.

  • dir_1_path (path-like) – Path to the first and second directory, respectively.

  • dir_2_path (path-like) – Path to the first and second directory, respectively.

Returns:

tuple – Returns a tuple with two elements: the first element is a boolean indicating whether the files in the two folders match and the second is a list of differences between the two folders (if applicable). If the files match, the list will be empty.