def should_obfuscate_filename(self):
        """Returns True if hide_file_names is true or the entity file path
        matches one in the list of obfuscated file paths."""

        for pattern in self.args.hide_file_names:
            try:
                compiled = re.compile(pattern, re.IGNORECASE)
                if compiled.search(self.entity):
                    return True
            except re.error as ex:
                log.warning(u('Regex error ({msg}) for hide_file_names pattern: {pattern}').format(
                    msg=u(ex),
                    pattern=u(pattern),
                ))
        return False
Returns True if hide_file_names is true or the entity file path
        matches one in the list of obfuscated file paths.