Package railo.commons.io.res

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


  public void updateJar(Resource resJar) throws IOException {
    updateJar(config, resJar);
  }
  private static void updateJar(Config config, Resource resJar) throws IOException {
    Resource lib = config.getConfigDir().getRealResource("lib");
    if(!lib.exists())lib.mkdir();
     
    Resource fileLib = lib.getRealResource(resJar.getName());
   
    if(fileLib.length()!=resJar.length()){
      IOUtil.closeEL(config.getClassLoader());
View Full Code Here


    }
  }
 
  static void updateJar(Config config, InputStream is, String name,boolean closeStream) throws IOException {
    Resource lib = config.getConfigDir().getRealResource("lib");
    if(!lib.exists())lib.mkdir();
     
    Resource fileLib = lib.getRealResource(name);
   
    IOUtil.closeEL(config.getClassLoader());
    IOUtil.copy(is, fileLib.getOutputStream(), closeStream, true);
View Full Code Here

  private static final Map<String,ASMMethod>methods=new ReferenceMap();

  public static void main(String[] args) throws Throwable {
    ResourceProvider frp = ResourcesImpl.getFileResourceProvider();
    Resource root = frp.getResource("/Users/mic/Projects/Railo/webroot/WEB-INF/railo/cfclasses/wrappers/");
    root.mkdir();
    PhysicalClassLoader pcl = new PhysicalClassLoader(root);
    //PhysicalClassLoader pcl = (PhysicalClassLoader)ThreadLocalPageContext.getConfig().getRPCClassLoader(false);

    ASMProxyFactory.getClass(pcl, root, ArrayNew.class);
   
View Full Code Here

     * @throws PageException
     */
    public void setAttachmentpath(String attachmentPath) throws PageException {
        //try {
          Resource attachmentDir=pageContext.getConfig().getResource(attachmentPath);
            if(!attachmentDir.exists() && !attachmentDir.mkdir()) {
                attachmentDir=pageContext.getConfig().getTempDirectory().getRealResource(attachmentPath);
                if(!attachmentDir.exists() && !attachmentDir.mkdir())
                    throw new ApplicationException("directory ["+attachmentPath+"] doesent exist and can't created");
            }
            if(!attachmentDir.isDirectory())throw new ApplicationException("file ["+attachmentPath+"] is not a directory");
View Full Code Here

    public void setAttachmentpath(String attachmentPath) throws PageException {
        //try {
          Resource attachmentDir=pageContext.getConfig().getResource(attachmentPath);
            if(!attachmentDir.exists() && !attachmentDir.mkdir()) {
                attachmentDir=pageContext.getConfig().getTempDirectory().getRealResource(attachmentPath);
                if(!attachmentDir.exists() && !attachmentDir.mkdir())
                    throw new ApplicationException("directory ["+attachmentPath+"] doesent exist and can't created");
            }
            if(!attachmentDir.isDirectory())throw new ApplicationException("file ["+attachmentPath+"] is not a directory");
            pageContext.getConfig().getSecurityManager().checkFileLocation(attachmentDir);
            this.attachmentPath = attachmentDir;
View Full Code Here

  }

  private static void loadLib(ConfigServerImpl configServer, ConfigImpl config) throws IOException {
    // get lib and classes resources
    Resource lib = config.getConfigDir().getRealResource("lib");
    lib.mkdir();
    Resource classes = config.getConfigDir().getRealResource("classes");
    classes.mkdir();
    Resource[] libs = lib.listResources(ExtensionResourceFilter.EXTENSION_JAR_NO_DIR);

    // merge resources
View Full Code Here

  private static void loadLib(ConfigServerImpl configServer, ConfigImpl config) throws IOException {
    // get lib and classes resources
    Resource lib = config.getConfigDir().getRealResource("lib");
    lib.mkdir();
    Resource classes = config.getConfigDir().getRealResource("classes");
    classes.mkdir();
    Resource[] libs = lib.listResources(ExtensionResourceFilter.EXTENSION_JAR_NO_DIR);

    // merge resources
    if (!ResourceUtil.isEmptyDirectory(classes, ExtensionResourceFilter.EXTENSION_CLASS_DIR)) {
      if(ArrayUtil.isEmpty(libs)) {
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.