public static boolean isDoubleOpen(Context context, List<String> list) {
String path = context.getApplicationContext().getFilesDir().getAbsolutePath();
if (list == null || list.size() <= 0) {
list = new ArrayList<>();
list.add("(/data/user/0/com.hsp.indonesia/files|/data/data/com.hsp.indonesia/files)");
}
for (String filePath : list) {
Pattern pattern = Pattern.compile(filePath);
if (pattern.matcher(path).matches()) {
return false;
}
}
return true;
}
正则表达式格式
最新推荐文章于 2024-04-12 14:26:02 发布