Package railo.commons.io.res

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


   
    Resource lib = config.getConfigDir().getRealResource("lib");
    boolean changed=false;
    if(lib.isDirectory()){
      for(int n=0;n<names.length;n++){
        Resource[] children = lib.listResources(new MyResourceNameFilter(names[n].trim()));
        for(int i=0;i<children.length;i++){
          try {
            changed=true;
            IOUtil.closeEL(config.getClassLoader());
            children[i].remove(false);
View Full Code Here


   
    try {
      // delete files that has expired
      AndResourceFilter andFilter = new AndResourceFilter(new ResourceFilter[]{EXT_FILTER,new ExpiresFilter(time,true)});
      String appName,cfid2,cfid;
      Resource[] apps = dir.listResources(DIR_FILTER),cfidDir,files;
     
      if(apps!=null)for(int a=0;a<apps.length;a++){
        appName=StorageScopeFile.decode(apps[a].getName());
        cfidDir=apps[a].listResources(DIR_FILTER);
        if(cfidDir!=null)for(int b=0;b<cfidDir.length;b++){
View Full Code Here

          dir.mkdirs();
        }
        return;
      }
     
      Resource[] children = dir.listResources(ALL_EXT);
      Resource child;
      String ext;
      for(int i=0;i<children.length;i++){
        child=children[i];
        try {
View Full Code Here

      Resource dir = ResourceUtil.toResourceNotExisting(pc, strDir,true);
     
      if(dir.isDirectory()) {
        java.util.List<String> list=new ArrayList<String>();
        // we use the class files here to get the info, the source files are optional and perhaps not present.
        Resource[] children = dir.listResources(FILTER_CLASS);
        String className,c,sourceName=null;
        for(int i=0;i<children.length;i++){
          className=children[i].getName();
          className=className.substring(0,className.length()-6);
          className=packageName+"."+className;
View Full Code Here

    Struct rtn=new StructImpl();
    Struct driver;
   
    try {
      Resource railoContext = ResourceUtil.toResourceExisting(pc() ,"/railo-context/admin/dbdriver/");
      Resource[] children = railoContext.listResources(new ExtensionResourceFilter("cfc"));
        
        String name;
        for(int i=0;i<children.length;i++) {
          driver=new StructImpl();
          name=ListFirst.call(pc(),children[i].getName(),".");
View Full Code Here

    private void doGetJars() throws PageException {
      Resource lib = config.getConfigDir().getRealResource("lib");
    railo.runtime.type.Query qry=new QueryImpl(new String[]{"name","source"},new String[]{"varchar","varchar"},0,"jars");
      
    if(lib.isDirectory()){
      Resource[] children = lib.listResources(new ExtensionResourceFilter(new String[]{".jar",".zip"},false,true));
      for(int i=0;i<children.length;i++){
        qry.addRow();
        qry.setAt("name", i+1, children[i].getName());
        qry.setAt("source", i+1, children[i].getAbsolutePath());
      }
View Full Code Here

        sct.set("extensions",new ArrayImpl(config.getCustomTagExtensions()));
    }

    private void doGetDatasourceDriverList() throws PageException {
      Resource railoContext = ResourceUtil.toResourceExisting(pageContext ,"/railo-context/admin/dbdriver/");
      Resource[] children = railoContext.listResources(new ExtensionResourceFilter("cfc"));
      String rtnVar=getString("admin",action,"returnVariable");
     
      railo.runtime.type.Query qry=new QueryImpl(new String[]{"name"},children.length,rtnVar);
        
     
View Full Code Here

       
    }

  private void doGetDebuggingList() throws PageException {
      Resource railoContext = ResourceUtil.toResourceExisting(pageContext ,"/railo-context/templates/debugging/");
      Resource[] children = railoContext.listResources(new ExtensionResourceFilter("cfm"));
      String rtnVar=getString("admin",action,"returnVariable");
     
      railo.runtime.type.Query qry=new QueryImpl(new String[]{"name"},children.length,rtnVar);
        
     
View Full Code Here

    ExtensionResourceFilter filter = new ExtensionResourceFilter(".script",false);
   
    // move old structured file in new structure
    try {
      Resource dir = config.getClientScopeDir(),trgres;
      Resource[] children = dir.listResources(filter);
      String src,trg;
      int index;
      for(int i=0;i<children.length;i++) {
        src=children[i].getName();
        index=src.indexOf('-');
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.