@Test public void appendPathDot() throws Exception { assertEquals("A/./B", Utils.appendPath("A", "./B")); assertEquals("A/./B", Utils.appendPath("A", "./B/")); assertEquals("/A/./B", Utils.appendPath("/A", "./B")); assertEquals("/A/B/./C/D", Utils.appendPath("/A/B", "./C/D")); assertEquals("A/B/./C/D", Utils.appendPath("A/B", "./C/D/")); }
@NonNull public static String appendPath(@NonNull String first, @NonNull String second) { String result = first + SEP + second; while (result.contains(" result = result.replaceAll(" } if (result.length() > 1 && result.endsWith(SEP)) { return result.substring(0, result.length() - 1); } else { return result; } }
Utils { @NonNull public static String appendPath(@NonNull String first, @NonNull String second) { String result = first + SEP + second; while (result.contains(" result = result.replaceAll(" } if (result.length() > 1 && result.endsWith(SEP)) { return result.substring(0, result.length() - 1); } else { return result; } } }
Utils { @NonNull public static String appendPath(@NonNull String first, @NonNull String second) { String result = first + SEP + second; while (result.contains(" result = result.replaceAll(" } if (result.length() > 1 && result.endsWith(SEP)) { return result.substring(0, result.length() - 1); } else { return result; } }  }
Utils { @NonNull public static String appendPath(@NonNull String first, @NonNull String second) { String result = first + SEP + second; while (result.contains(" result = result.replaceAll(" } if (result.length() > 1 && result.endsWith(SEP)) { return result.substring(0, result.length() - 1); } else { return result; } }  static boolean isValidFileName(@Nullable String name); @NonNull static String appendPath(@NonNull String first,
                                    @NonNull String second); @NonNull static File getFileForUri(@NonNull Uri uri); @NonNull static List<Uri> getSelectedFilesFromResult(@NonNull Intent data); }
Utils { @NonNull public static String appendPath(@NonNull String first, @NonNull String second) { String result = first + SEP + second; while (result.contains(" result = result.replaceAll(" } if (result.length() > 1 && result.endsWith(SEP)) { return result.substring(0, result.length() - 1); } else { return result; } }  static boolean isValidFileName(@Nullable String name); @NonNull static String appendPath(@NonNull String first,
                                    @NonNull String second); @NonNull static File getFileForUri(@NonNull Uri uri); @NonNull static List<Uri> getSelectedFilesFromResult(@NonNull Intent data);  }