@Test public void testGetFilename() { Assert.assertEquals("filename.txt", FileUtil.getFilename("/tmp/filename.txt")); Assert.assertEquals("filename.txt", FileUtil.getFilename("/filename.txt")); Assert.assertEquals("filename.txt", FileUtil.getFilename("/tmp/sample/filename.txt")); }
public static String getFilename(String filepath) { if (StringUtil.isEmpty(filepath)) { return ""; } File file = new File(filepath); return file.getName(); }
FileUtil { public static String getFilename(String filepath) { if (StringUtil.isEmpty(filepath)) { return ""; } File file = new File(filepath); return file.getName(); } }
FileUtil { public static String getFilename(String filepath) { if (StringUtil.isEmpty(filepath)) { return ""; } File file = new File(filepath); return file.getName(); } private  FileUtil(); }
FileUtil { public static String getFilename(String filepath) { if (StringUtil.isEmpty(filepath)) { return ""; } File file = new File(filepath); return file.getName(); } private  FileUtil(); static String readFile(File file); static String readFile(String filename); static byte[] readFileAsBytes(File file); static byte[] readFileAsBytes(String filename); static String backupFile(File source); static InputStream getFileStream(String name); static void writeFile(String filename, String content); static void appendFile(String filename, String content); static File createDirectory(String path); static boolean copyMultipartFile(final MultipartFile multipartFile,
			File dest); static Properties readProperty(File f); static void saveProperty(String filename, Properties properties, String header); static String getFilename(String filepath); }
FileUtil { public static String getFilename(String filepath) { if (StringUtil.isEmpty(filepath)) { return ""; } File file = new File(filepath); return file.getName(); } private  FileUtil(); static String readFile(File file); static String readFile(String filename); static byte[] readFileAsBytes(File file); static byte[] readFileAsBytes(String filename); static String backupFile(File source); static InputStream getFileStream(String name); static void writeFile(String filename, String content); static void appendFile(String filename, String content); static File createDirectory(String path); static boolean copyMultipartFile(final MultipartFile multipartFile,
			File dest); static Properties readProperty(File f); static void saveProperty(String filename, Properties properties, String header); static String getFilename(String filepath);  }