boolean (@Nullable String s) { if (!StringUtil.isEmpty(s)) { s = Objects.requireNonNull(s); s = FileUtil.toSystemIndependentName(s); final List<String> components = StringUtil.split(s, "/"); for (String name : components) { if (Strings.areSameInstance(name, components.get(0)) && SystemInfo.isWindows && name.endsWith(":")) { continue; } if (!PathUtil.isValidFileName(name)) { return false; } } return true; } return false; }