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

org.cryptomator.cryptofs.PatternPathMatcher Maven / Gradle / Ivy

There is a newer version: 2.7.1-beta1
Show newest version
package org.cryptomator.cryptofs;

import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.util.regex.Pattern;

class PatternPathMatcher implements PathMatcher {

	private final Pattern pattern;

	public PatternPathMatcher(Pattern pattern) {
		this.pattern = pattern;
	}

	/**
	 * @deprecated for testing
	 */
	@Deprecated
	Pattern getPattern() {
		return pattern;
	}

	@Override
	public boolean matches(Path path) {
		return pattern.matcher(path.toString()).matches();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy