(self, path: Path, rec: bool = False)
return files
helper function to search the given directory and obtain all the files in it's
        structure
        Args:
            path: path to the root directory
            rec: whether to search all the sub-level directories for files recursively
        Returns: list of all found paths
helper function to search the given directory and obtain all the files in it's
        structure
        Args:
            path: path to the root directory
            rec: whether to search all the sub-level directories for files recursively
        Returns: list of all found paths
helper function to search the given directory and obtain all the files in it s structure Args : path : path to the root directory rec : whether to search all the sub - level directories for files recursively Returns : list of all found paths
def _get_files(self, path: Path, rec: bool = False) -> List[Path]:
        """
        helper function to search the given directory and obtain all the files in it's
        structure
        Args:
            path: path to the root directory
            rec: whether to search all the sub-level directories for files recursively
        Returns: list of all found paths
        """
        files = []
        for possible_file in path.iterdir():
            if possible_file.is_file():
                files.append(possible_file)
            elif rec and possible_file.is_dir():
                files.extend(self._get_files(possible_file))
        return files
def _get_files ( self , path : Path , rec : bool = False ) -> List [ Path ] : files = [ ] for possible_file in path . iterdir ( ) : if possible_file . is_file ( ) : files . append ( possible_file ) elif rec and possible_file . is_dir ( ) : files . extend ( self . _get_files ( possible_file ) ) return files