Join path components @param args @return
(String... args)
| 37 | * @return |
| 38 | */ |
| 39 | public static String joinPath(String... args) { |
| 40 | StringBuilder result = new StringBuilder(); |
| 41 | boolean first = true; |
| 42 | for (String a : args) { |
| 43 | if (a != null && a.length() > 0) { |
| 44 | if (!first) { |
| 45 | result.append("/"); |
| 46 | } |
| 47 | result.append(a); |
| 48 | first = false; |
| 49 | } |
| 50 | } |
| 51 | return result.toString(); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Given a basename for a file, find the next possible filename if this file already exists. For |
no test coverage detected