List of utility methods to do Path Sub Path Get
File[] | getSubFiles(String parentpath) get Sub Files return getSubFiles(parentpath, (String) null);
|
File[] | getSubFiles(String parentpath, FileFilter fileFilter) get Sub Files return getSubFiles(parentpath, null, fileFilter);
|
File[] | getSubFiles(String parentpath, String uri) get Sub Files File file = null; if (uri == null || uri.trim().length() == 0) { file = new File(parentpath); } else { file = new File(parentpath, uri); if (!file.exists() || file.isFile()) return null; ... |
File[] | getSubFiles(String parentpath, String uri, FileFilter fileFilter) get Sub Files File file = null; if (uri == null || uri.trim().length() == 0) { file = new File(parentpath); } else { file = new File(parentpath, uri); if (!file.exists() || file.isFile()) return null; ... |
boolean | hasSubFiles(String path) has Sub Files File file = new File(path); if (!file.exists() || file.isFile()) return false; File[] subFiles = file.listFiles(new FileFilter() { public boolean accept(File pathname) { if (!pathname.isDirectory()) return true; else ... |
boolean | hasSubFiles(String path, String uri) has Sub Files File file = new File(path, uri); if (!file.exists() || file.isFile()) return false; File[] subFiles = file.listFiles(new FileFilter() { public boolean accept(File pathname) { if (!pathname.isDirectory()) return true; else ... |
String | getLastPathComponent(File file) get Last Path Component String[] segments = file.getAbsolutePath().split("/"); String lastPathComponent = segments[segments.length - 1]; return lastPathComponent; |
String | getLastPathComponent(String filePath) get Last Path Component String[] segments = filePath.split("/"); String lastPathComponent = segments[segments.length - 1]; return lastPathComponent; |
String | getLastPathComponent(final String filePath) get Last Path Component final String[] segments = filePath.split("/"); final String lastPathComponent = segments[segments.length - 1]; return lastPathComponent; |
String | getLastPathComponent(String url) get Last Path Component int index = url.lastIndexOf("/"); if (index > 0) return url.substring(url.lastIndexOf("/") + 1, url.length()); return url; |