package net.filebot.hash; import java.io.File; import java.text.ParseException; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SfvFormat extends VerificationFormat { @Override public String format(String path, String hash) { // e.g folder/file.txt 970E4EF1 return String.format("%s %s", path, hash); } /** * Pattern used to parse the lines of a sfv file. * *
* Sample: * folder/file.txt 970E4EF1 * | Group 1 | | Gr.2 | **/ private final Pattern pattern = Pattern.compile("^(.+)\\s+(\\p{XDigit}{8})$"); @Override public Entry