protected static String filename(String full_path) { String[] comps=Util.components(full_path, File.separator); return comps != null? comps[comps.length -1] : null; }
protected static String filename(String full_path) { String[] comps=Util.components(full_path, File.separator); return comps != null? comps[comps.length -1] : null; }
protected static String filename(String full_path) { String[] comps=Util.components(full_path, File.separator); return comps != null? comps[comps.length -1] : null; }
protected static String trim(String str) { if(str == null) return null; str=str.trim(); if(str.equals(File.separator)) return str; String[] comps=Util.components(str, File.separator); return comps != null && comps.length > 0? comps[comps.length-1] : null; }
protected static String trim(String str) { if(str == null) return null; str=str.trim(); if(str.equals(File.separator)) return str; String[] comps=Util.components(str, File.separator); return comps != null && comps.length > 0? comps[comps.length-1] : null; }
protected static String trim(String str) { if(str == null) return null; str=str.trim(); if(str.equals(File.separator)) return str; String[] comps=Util.components(str, File.separator); return comps != null && comps.length > 0? comps[comps.length-1] : null; }
/** * Verifies whether child is a child (dir or file) of parent * @param parent * @param child * @return True if child is a child, false otherwise */ protected static boolean isChildOf(String parent, String child) { if(parent == null || child == null) return false; if(!child.startsWith(parent)) return false; if(child.length() <= parent.length()) return false; int from=parent.equals(File.separator)? parent.length() : parent.length() +1; // if(from-1 > child.length()) // return false; String[] comps=Util.components(child.substring(from), File.separator); return comps != null && comps.length <= 1; }
/** * Verifies whether child is a child (dir or file) of parent * @param parent * @param child * @return True if child is a child, false otherwise */ protected static boolean isChildOf(String parent, String child) { if(parent == null || child == null) return false; if(!child.startsWith(parent)) return false; if(child.length() <= parent.length()) return false; int from=parent.equals(File.separator)? parent.length() : parent.length() +1; // if(from-1 > child.length()) // return false; String[] comps=Util.components(child.substring(from), File.separator); return comps != null && comps.length <= 1; }
/** * Verifies whether child is a child (dir or file) of parent * @param parent * @param child * @return True if child is a child, false otherwise */ protected static boolean isChildOf(String parent, String child) { if(parent == null || child == null) return false; if(!child.startsWith(parent)) return false; if(child.length() <= parent.length()) return false; int from=parent.equals(File.separator)? parent.length() : parent.length() +1; // if(from-1 > child.length()) // return false; String[] comps=Util.components(child.substring(from), File.separator); return comps != null && comps.length <= 1; }
String[] comps=Util.components(grid_path, File.separator); String filename=comps[comps.length - 1]; target_path=target_path + (target_path.endsWith(File.separator)? filename : File.separator + filename);
String[] comps=Util.components(grid_path, File.separator); String filename=comps[comps.length - 1]; target_path=target_path + (target_path.endsWith(File.separator)? filename : File.separator + filename);
String[] comps=Util.components(grid_path, File.separator); String filename=comps[comps.length - 1]; target_path=target_path + (target_path.endsWith(File.separator)? filename : File.separator + filename);
String[] components=Util.components(path, File.separator); if(components == null) return false;
String[] components=Util.components(path, File.separator); if(components == null) return false;
String[] components=Util.components(path, File.separator); if(components == null) return false;
String[] comps=Util.components(local_path, File.separator); String filename=comps[comps.length - 1]; target_path=target_path + (target_path.equals(File.separator)? filename : File.separator + filename);
String[] comps=Util.components(local_path, File.separator); String filename=comps[comps.length - 1]; target_path=target_path + (target_path.equals(File.separator)? filename : File.separator + filename);
String[] comps=Util.components(local_path, File.separator); String filename=comps[comps.length - 1]; target_path=target_path + (target_path.equals(File.separator)? filename : File.separator + filename);