yangys
2024-03-31 2969df3e404db3cd116f27db1495e523ce05bf86
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.qianwen.core.tool.utils;
 
import java.io.File;
import java.io.FileFilter;
import java.io.Serializable;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;
 
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/utils/AntPathFilter.class */
public class AntPathFilter implements FileFilter, Serializable {
    private static final long serialVersionUID = 812598009067554612L;
    private static final PathMatcher PATH_MATCHER = new AntPathMatcher();
    private final String pattern;
 
    public AntPathFilter(final String pattern) {
        this.pattern = pattern;
    }
 
    @Override // java.io.FileFilter
    public boolean accept(File pathname) {
        String filePath = pathname.getAbsolutePath();
        return PATH_MATCHER.match(this.pattern, filePath);
    }
}