boolean (String name) { if (name == null || name.isEmpty() || ".".equals(name) || "..".equals(name)) { return true; } for (int i = 0; i < name.length(); i++) { char ch = name.charAt(i); if (ch == '/' || ch == '\\') { return true; } } return false; }