@Test public void test() { String p=IOUtils.getPath("/data/www/ROOT/1.txt"); System.out.println(p); }
public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } IOUtils(String body, String path); }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } IOUtils(String body, String path); void setPath(String path); void setBody(String body); static void createDir(String path); static void writeFile(String body, String path); static String readFile(String path); static String getPath( String path); static boolean delFile(String path); }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } IOUtils(String body, String path); void setPath(String path); void setBody(String body); static void createDir(String path); static void writeFile(String body, String path); static String readFile(String path); static String getPath( String path); static boolean delFile(String path);  }