Package railo.commons.io.res

Examples of railo.commons.io.res.Resource.list()


  private static String[] _listPhysical(String path, Mapping mapping){
    Resource physical = mapping.getPhysical();
    if(physical!=null) {
      Resource dir = physical.getRealResource(path);
      if(dir.isDirectory()) {
        return dir.list(FILTER_CFC);
      }
    }
    return EMPTY;
  }
 
View Full Code Here


        String strSrc = getString("admin",action,"source");
        Resource src = ResourceUtil.toResourceExisting(pageContext, strSrc);
        Resource srcDir = ResourceUtil.toResourceExisting(pageContext, "zip://"+src.getAbsolutePath());
        String name=ResourceUtil.getName(src.getName());
        if(!PluginFilter.doAccept(srcDir))
          throw new ApplicationException("plugin ["+strSrc+"] is invalid, missing one of the following files [Action.cfc,language.xml] in root, existing files are ["+railo.runtime.type.util.ListUtil.arrayToList(srcDir.list(), ", ")+"]");
       
        Resource dir = getPluginDirectory();
        Resource trgDir = dir.getRealResource(name);
        if(trgDir.exists()){
          trgDir.remove(true);
View Full Code Here

    }
   
    private void doGetPlugins() throws PageException {
        Resource dir = getPluginDirectory();
     
      String[] list = dir.list(new PluginFilter());
      railo.runtime.type.Query qry=
          new QueryImpl(
              new Collection.Key[]{KeyConstants._name},
              list.length,getString("admin",action,"returnVariable"));
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.