@Test void getFileName() { Assertions.assertEquals("content", FileUtils.getName(content)); Assertions.assertEquals("c", FileUtils.getName(new File(directory, "c.test"))); }
public static String getName(File file) { String name = file.getName(); int pos = name.lastIndexOf("."); return pos == -1 ? name : name.substring(0, pos); }
FileUtils { public static String getName(File file) { String name = file.getName(); int pos = name.lastIndexOf("."); return pos == -1 ? name : name.substring(0, pos); } }
FileUtils { public static String getName(File file) { String name = file.getName(); int pos = name.lastIndexOf("."); return pos == -1 ? name : name.substring(0, pos); } private  FileUtils(); }
FileUtils { public static String getName(File file) { String name = file.getName(); int pos = name.lastIndexOf("."); return pos == -1 ? name : name.substring(0, pos); } private  FileUtils(); static boolean contains(File[] files, String fileName); static int getAmountOfFiles(File directory); static String getContentOfFile(File file); static String[] getContentAsLines(File file); static Collection<File> findFilesByExtension(String directory, String extension); static Collection<File> findFilesByExtension(File directory, String extension); static Node<File> collectFiles(File directory); static void overrideFile(File file, String content); static boolean delete(File file); static File[] toFiles(String... paths); static String getName(File file); static String getName(URL url); static String getName(String path); }
FileUtils { public static String getName(File file) { String name = file.getName(); int pos = name.lastIndexOf("."); return pos == -1 ? name : name.substring(0, pos); } private  FileUtils(); static boolean contains(File[] files, String fileName); static int getAmountOfFiles(File directory); static String getContentOfFile(File file); static String[] getContentAsLines(File file); static Collection<File> findFilesByExtension(String directory, String extension); static Collection<File> findFilesByExtension(File directory, String extension); static Node<File> collectFiles(File directory); static void overrideFile(File file, String content); static boolean delete(File file); static File[] toFiles(String... paths); static String getName(File file); static String getName(URL url); static String getName(String path);  }