Package railo.commons.io.res.filter

Examples of railo.commons.io.res.filter.ExtensionResourceFilter


       
        if(!tarFile.exists())
            throw new IOException(tarFile+" is not a existing file");
       
        if(tarFile.isDirectory()) {
          Resource[] files = tarFile.listResources(new ExtensionResourceFilter("tar"));
            if(files==null)
                throw new IOException("directory "+tarFile+" is empty");
            extract(FORMAT_TAR,files,targetDir);
            return;
        }
View Full Code Here


            throw new IOException(zipFile+" is not a existing file");
       
        if(zipFile.isDirectory()) {
          Resource[] files = zipFile.listResources(
                    new OrResourceFilter(new ResourceFilter[]{
                            new ExtensionResourceFilter("zip"),
                            new ExtensionResourceFilter("jar"),
                            new ExtensionResourceFilter("war"),
                            new ExtensionResourceFilter("tar"),
                            new ExtensionResourceFilter("ear")
                    })
            );
            if(files==null)
                throw new IOException("directory "+zipFile+" is empty");
            extract(FORMAT_ZIP,files,targetDir);
View Full Code Here

      if(classLoader==null) {
        Resource temp = config.getConfigDir().getRealResource("temp");
        Resource file=temp.getRealResource(Md5.getDigestAsString(Info.getVersionAsString())+".lmdp");
           
        if(!file.exists()){
          ResourceUtil.removeChildrenEL(temp, new ExtensionResourceFilter(".lmdp"));
         
              file.createFile(true);
              //print.out(new Info().getClass().getResource("/resource/lib/pd4ml.jar"));
              InputStream jar = new Info().getClass().getResourceAsStream("/resource/lib/pd4ml.jar");
            IOUtil.copy(jar, file,true);
View Full Code Here

    mappings.append(value.getXML());
    done.add(key);
  }

  public static List<Component> loadComponents(PageContext pc,HibernateORMEngine engine, ORMConfiguration ormConf) throws PageException {
    ExtensionResourceFilter filter = new ExtensionResourceFilter(pc.getConfig().getCFCExtension(),true);
    List<Component> components=new ArrayList<Component>();
    loadComponents(pc,engine,components,ormConf.getCfcLocations(),filter,ormConf);
    return components;
  }
View Full Code Here

   */
  public static TagLib[] loadFromDirectory(Resource dir,String saxParser) throws TagLibException  {
    if(!dir.isDirectory())return new TagLib[0];
    ArrayList<TagLib> arr=new ArrayList<TagLib>();
   
    Resource[] files=dir.listResources(new ExtensionResourceFilter("tld"));
    for(int i=0;i<files.length;i++)  {
      if(files[i].isFile())
        arr.add(TagLibFactory.loadFromFile(files[i],saxParser));
       
    }
View Full Code Here

   */
  public static FunctionLib[] loadFromDirectory(Resource dir,String saxParser) throws FunctionLibException  {
    if(!dir.isDirectory())return new FunctionLib[0];
    ArrayList<FunctionLib> arr=new ArrayList<FunctionLib>();
   
    Resource[] files=dir.listResources(new ExtensionResourceFilter("fld"));
    for(int i=0;i<files.length;i++)  {
      if(files[i].isFile())
        arr.add(FunctionLibFactory.loadFromFile(files[i],saxParser));       
    }
 
View Full Code Here

    return null;
  }
 
  private static String _getRecursive(Resource res, String path, String filename) {
      if(res.isDirectory()) {
        Resource[] children = res.listResources(new ExtensionResourceFilter(new String[]{".cfm",".cfc"},true,true));
        if(path!=null)path+=res.getName()+"/";
        else path="";
        String tmp;
        for(int i=0;i<children.length;i++){
          tmp= _getRecursive(children[i], path, filename);
View Full Code Here

     
        TagLib tl;
       
        // now overwrite with new data
        if(fileTld.isDirectory()) {
          Resource[] files=fileTld.listResources(new ExtensionResourceFilter("tld"));
            for(int i=0;i<files.length;i++) {
                try {
                  tl = TagLibFactory.loadFromFile(files[i]);
                  key=getKey(tl);
                  if(!map.containsKey(key))
View Full Code Here

     
      TagLib tl=getCoreTagLib();
     
        // now overwrite with new data
        if(tagDirectory.isDirectory()) {
          String[] files=tagDirectory.list(new ExtensionResourceFilter(new String[]{"cfm","cfc"}));
            for(int i=0;i<files.length;i++) {
              if(tl!=null)createTag(tl, files[i]);
                   
            }
        }
View Full Code Here

      this.functionMapping= new MappingImpl(this,"/mapping-function/",functionDirectory.getAbsolutePath(),null,ConfigImpl.INSPECT_NEVER,true,true,true,true,false,true,null);
      FunctionLib fl=flds[flds.length-1];
       
        // now overwrite with new data
        if(functionDirectory.isDirectory()) {
          String[] files=functionDirectory.list(new ExtensionResourceFilter(getCFMLExtensions()));
         
            for(int i=0;i<files.length;i++) {
              if(fl!=null)createFunction(fl, files[i]);
                   
            }
View Full Code Here

TOP

Related Classes of railo.commons.io.res.filter.ExtensionResourceFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.