@Override public String[] list() { return this.delegate.list(); }
if (web_inf_lib.exists() && web_inf_lib.isDirectory()) String[] files=web_inf_lib.list(); if (files != null)
String[] files=lib.list(); if (files != null)
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
public Collection<Resource> getAllResources() { try { ArrayList<Resource> deep=new ArrayList<>(); { String[] list=list(); if (list!=null) { for (String i:list) { Resource r=addPath(i); if (r.isDirectory()) deep.addAll(r.getAllResources()); else deep.add(r); } } } return deep; } catch(Exception e) { throw new IllegalStateException(e); } }
return null; String[] ls = list(); if (ls==null) return null;
return null; String[] ls = res.list(); if (ls==null) return null;
@Override public String[] list() { return resource.list(); }
@Override public String[] list() { return resource.list(); }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
/** * @return The list of resource names(merged) contained in the collection of resources. */ @Override public String[] list() { if(_resources==null) throw new IllegalStateException("*resources* not set."); HashSet<String> set = new HashSet<String>(); for(Resource r : _resources) { for(String s : r.list()) set.add(s); } String[] result=set.toArray(new String[set.size()]); Arrays.sort(result); return result; }
@Override public String[] list() { String[] baseList = null; String[] overrideList = null; if (base.isDirectory()) { baseList = base.list(); } if (override.isDirectory()) { overrideList = override.list(); } if (baseList == null || baseList.length == 0) return overrideList; if (overrideList == null || overrideList.length == 0) return baseList; Set<String> merge = new HashSet<String>(); CollectionUtils.addAll(merge, baseList); CollectionUtils.addAll(merge, overrideList); return merge.toArray(new String[merge.size()]); }
public Set<String> getResourcePaths(String path) { try { path = URIUtil.canonicalPath(path); Resource resource = getResource(path); if (resource != null && resource.exists()) { if (!path.endsWith(URIUtil.SLASH)) path = path + URIUtil.SLASH; String[] l = resource.list(); if (l != null) { HashSet<String> set = new HashSet<String>(); for (int i = 0; i < l.length; i++) set.add(path + l[i]); return set; } } } catch (Exception e) { LOG.ignore(e); } return Collections.emptySet(); }
public void addJars(Resource lib) { if (lib.exists() && lib.isDirectory()) { String[] files=lib.list(); for (int f=0;files!=null && f<files.length;f++) { try { Resource fn=lib.addPath(files[f]); String fnlc=fn.getName().toLowerCase(); if (!fn.isDirectory() && isAndroidArchive(fnlc)) { String jar=fn.getFile().getAbsolutePath(); addClassPath(jar); } } catch (Exception ex) { Log.warn(Log.EXCEPTION,ex); } } } }