All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avito.impact.changes.IgnoreSettings.kt Maven / Gradle / Ivy

Go to download

Collection of infrastructure libraries and gradle plugins of Avito Android project

The newest version!
package com.avito.impact.changes

import io.github.azagniotov.matcher.AntPathMatcherArrays

public class IgnoreSettings(private val patterns: Set = emptySet()) {

    private val patternMatcher = AntPathMatcherArrays.Builder()
        .withIgnoreCase()
        .withPathSeparator('/')
        .build()

    internal fun match(path: String): String? {
        return patterns.firstOrNull { pattern ->
            patternMatcher.isMatch(pattern, path)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy