// Path: src/main/java/com/superzanti/serversync/util/Glob.java
// public class Glob {
//     private static String sanitizePattern(String pattern) {
//         if (File.separator.equals("\\")) {
//             return pattern.replaceAll("[/\\\\]", "\\\\\\\\"); // Gross
//         } else {
//             return pattern.replaceAll("[/\\\\]", File.separator);
//         }
//     }
// 
//     private static PathMatcher globMatcher(String pattern) {
//         return FileSystems.getDefault().getPathMatcher("glob:" + pattern);
//     }
// 
//     public static Optional<String> getPattern(Path path, List<String> patterns) {
//         return patterns.stream().filter(p -> globMatcher(sanitizePattern(p)).matches(path)).findFirst();
//     }
// 
//     public static boolean matches(Path path, String pattern) {
//         return globMatcher(sanitizePattern(pattern)).matches(path);
//     }
// 
//     public static boolean matches(Path path, List<String> patterns) {
//         return patterns.stream().anyMatch(pattern -> globMatcher(sanitizePattern(pattern)).matches(path));
//     }
// }


import com.superzanti.serversync.util.Glob;
import java.nio.file.Path;
package com.superzanti.serversync.config;



/**
 * A wrapper for: {@link Glob}.
 *
 * Matches against the user configured list of ignored files.
 *
 * @author Rheimus
 */
public class IgnoredFilesMatcher {
    private static final SyncConfig config = SyncConfig.getConfig();

    public static boolean matches(Path file) {
// Path: src/main/java/com/superzanti/serversync/util/Glob.java
// public class Glob {
//     private static String sanitizePattern(String pattern) {
//         if (File.separator.equals("\\")) {
//             return pattern.replaceAll("[/\\\\]", "\\\\\\\\"); // Gross
//         } else {
//             return pattern.replaceAll("[/\\\\]", File.separator);
//         }
//     }
// 
//     private static PathMatcher globMatcher(String pattern) {
//         return FileSystems.getDefault().getPathMatcher("glob:" + pattern);
//     }
// 
//     public static Optional<String> getPattern(Path path, List<String> patterns) {
//         return patterns.stream().filter(p -> globMatcher(sanitizePattern(p)).matches(path)).findFirst();
//     }
// 
//     public static boolean matches(Path path, String pattern) {
//         return globMatcher(sanitizePattern(pattern)).matches(path);
//     }
// 
//     public static boolean matches(Path path, List<String> patterns) {
//         return patterns.stream().anyMatch(pattern -> globMatcher(sanitizePattern(pattern)).matches(path));
//     }
// }


// Path: src/main/java/com/superzanti/serversync/config/IgnoredFilesMatcher.java
import com.superzanti.serversync.util.Glob;
import java.nio.file.Path;

package com.superzanti.serversync.config;



/**
 * A wrapper for: {@link Glob}.
 *
 * Matches against the user configured list of ignored files.
 *
 * @author Rheimus
 */
public class IgnoredFilesMatcher {
    private static final SyncConfig config = SyncConfig.getConfig();

    public static boolean matches(Path file) {
        return Glob.matches(file, config.FILE_IGNORE_LIST);