@Test public void extension() { assertEquals("txt", FileUtils.extension("a.txt")); }
public String extension(String filename) { int index = MoreObjects.notNull(filename).lastIndexOf(Strings.DOT); if (index == -1) { return Strings.EMPTY; } return filename.substring(index + 1); }
FileUtils { public String extension(String filename) { int index = MoreObjects.notNull(filename).lastIndexOf(Strings.DOT); if (index == -1) { return Strings.EMPTY; } return filename.substring(index + 1); } }
FileUtils { public String extension(String filename) { int index = MoreObjects.notNull(filename).lastIndexOf(Strings.DOT); if (index == -1) { return Strings.EMPTY; } return filename.substring(index + 1); }  }
FileUtils { public String extension(String filename) { int index = MoreObjects.notNull(filename).lastIndexOf(Strings.DOT); if (index == -1) { return Strings.EMPTY; } return filename.substring(index + 1); }  void mkdirs(File dir); void mkdirs(Path path); void mkdirs(String path); void mkdirs(String parent, String... children); void mkdirsForFile(File file); void touch(File file); void touch(Path path); void touch(String filepath); String extension(String filename); int countFiles(File file); int countFiles(File file, Predicate<File> filter); int countDirs(File file); int countDirs(File file, Predicate<File> filter); String absolutePath(File file); boolean isSamePath(File file, File another); boolean isRoot(File dir); int delete(File file); int deleteFile(File file); int deleteDir(File file); File tempDir(); File tempBaseDir(); int cleanTempBaseDir(); File createTempDir(String first, String... children); String parseMimeType(String filename); String getMimeType(String extension); File download(String url); void download(String url, File file); }
FileUtils { public String extension(String filename) { int index = MoreObjects.notNull(filename).lastIndexOf(Strings.DOT); if (index == -1) { return Strings.EMPTY; } return filename.substring(index + 1); }  void mkdirs(File dir); void mkdirs(Path path); void mkdirs(String path); void mkdirs(String parent, String... children); void mkdirsForFile(File file); void touch(File file); void touch(Path path); void touch(String filepath); String extension(String filename); int countFiles(File file); int countFiles(File file, Predicate<File> filter); int countDirs(File file); int countDirs(File file, Predicate<File> filter); String absolutePath(File file); boolean isSamePath(File file, File another); boolean isRoot(File dir); int delete(File file); int deleteFile(File file); int deleteDir(File file); File tempDir(); File tempBaseDir(); int cleanTempBaseDir(); File createTempDir(String first, String... children); String parseMimeType(String filename); String getMimeType(String extension); File download(String url); void download(String url, File file);  }