FilenameUtils { public static String getPathNoEndSeparator(String filename) { return doGetPath(filename, 0); } FilenameUtils(); static String normalize(String filename); static String normalize(String filename, boolean unixSeparator); static String normalizeNoEndSeparator(String filename); static String normalizeNoEndSeparator(String filename, boolean unixSeparator); static String concat(String basePath, String fullFilenameToAdd); static String separatorsToUnix(String path); static String separatorsToWindows(String path); static String separatorsToSystem(String path); static int getPrefixLength(String filename); static int indexOfLastSeparator(String filename); static int indexOfExtension(String filename); static String getPrefix(String filename); static String getPath(String filename); static String getPathNoEndSeparator(String filename); static String getFullPath(String filename); static String getFullPathNoEndSeparator(String filename); static String getName(String filename); static String getBaseName(String filename); static String getExtension(String filename); static String removeExtension(String filename); static boolean equals(String filename1, String filename2); static boolean equalsOnSystem(String filename1, String filename2); static boolean equalsNormalized(String filename1, String filename2); static boolean equalsNormalizedOnSystem(String filename1, String filename2); static boolean equals(
            String filename1, String filename2,
            boolean normalized, IOCase caseSensitivity); static boolean isExtension(String filename, String extension); static boolean isExtension(String filename, String[] extensions); static boolean isExtension(String filename, Collection<String> extensions); static boolean wildcardMatch(String filename, String wildcardMatcher); static boolean wildcardMatchOnSystem(String filename, String wildcardMatcher); static boolean wildcardMatch(String filename, String wildcardMatcher, IOCase caseSensitivity); static final char EXTENSION_SEPARATOR; static final String EXTENSION_SEPARATOR_STR; }
@Test public void testGetPathNoEndSeparator() throws Exception { assertEquals("a\\b", FilenameUtils.getPathNoEndSeparator("C:\\a\\b\\c.txt")); }