boolean (@NotNull String value) { if (value.isBlank()) return false; String withoutWildcards = value.trim().replaceAll("\\*", "a").replaceAll("\\?", "a"); return PathUtil.isValidFileName(withoutWildcards, true); }