pathlib_mate/mate_path_filters.py
def select_by_pattern_in_fname(self,
                                   pattern,
                                   recursive=True,
                                   case_sensitive=False):
        """
        Select file path by text pattern in file name.

        **中文文档**

        选择文件名中包含指定子字符串的文件。
        """
        if case_sensitive:
            def filters(p):
                return pattern in p.fname
        else:
            pattern = pattern.lower()

            def filters(p):
                return pattern in p.fname.lower()

        return self.select_file(filters, recursive)
def select_by_pattern_in_fname(self,
                                   pattern,
                                   recursive=True,
                                   case_sensitive=False):
        """
        Select file path by text pattern in file name.

        **中文文档**

        选择文件名中包含指定子字符串的文件。
        """
        if case_sensitive:
            def filters(p):
                return pattern in p.fname
        else:
            pattern = pattern.lower()

            def filters(p):
                return pattern in p.fname.lower()

        return self.select_file(filters, recursive)
def select_by_pattern_in_fname ( self , pattern , recursive = True , case_sensitive = False ) : if case_sensitive : def filters ( p ) : return pattern in p . fname else : pattern = pattern . lower ( ) def filters ( p ) : return pattern in p . fname . lower ( ) return self . select_file ( filters , recursive )
Select file path by text pattern in file name.

        **中文文档**

        选择文件名中包含指定子字符串的文件。
Select file path by text pattern in file name .