Package java.io

Examples of java.io.File.mkdir()


     * @throws Exception
     */
    public void testGenerateClasses() throws Exception {
        File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-classes-out");
        if (!outDir.exists()) {
            outDir.mkdir();
        }

        String command = "wsconsume";
        // original package was org.jboss.test.ws.benchmark.jaxws.doclit
        String options = "-p org.jboss.test.script -o " + outDir.getAbsolutePath();
View Full Code Here


     * @throws Exception
     */
    public void testGenerateSources() throws Exception {
        File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-sources-out");
        if (!outDir.exists()) {
            outDir.mkdir();
        }

        String command = "wsconsume";
        String options = "-n -p org.jboss.test.script -s " + outDir.getAbsolutePath();
        String args = wsdlFileUrl.getFile();
View Full Code Here

     * @throws Exception
     */
    public void testKeepSources() throws Exception {
        File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-sources-keep-out");
        if (!outDir.exists()) {
            outDir.mkdir();
        }

        String command = "wsconsume";
        String options = "-k -p org.jboss.test.script -s " + outDir.getAbsolutePath();
        String args = wsdlFileUrl.getFile();
View Full Code Here

     * @throws Exception
     */
    public void testGenerateBoth() throws Exception {
        File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-both-out");
        if (!outDir.exists()) {
            outDir.mkdir();
        }

        String command = "wsconsume";
        String options = "-k -p org.jboss.test.script -o " + outDir.getAbsolutePath();
        String args = wsdlFileUrl.getFile();
View Full Code Here

        File outSourcesDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-separate-sources-out");
        if (!outClassesDir.exists()) {
            outClassesDir.mkdir();
        }
        if (!outSourcesDir.exists()) {
            outSourcesDir.mkdir();
        }

        String command = "wsconsume";
        String options = "-k -p org.jboss.test.script -o " + outClassesDir.getAbsolutePath()
                + " -s " + outSourcesDir.getAbsolutePath();
View Full Code Here

            System.out.println("Installed CXF and no WSTools command line script as expected (EAP 5.1.x) ");
            return;
        }
        File outDir = new File(scriptsDirUrl.getFile() + FS + "wstools-classes-out");
        if (!outDir.exists()) {
            outDir.mkdir();
        }

        String command = "wstools";
        // original package was org.jboss.test.ws.benchmark.jaxws.doclit
        String options = "-classpath " + classesDirUrl.getFile() + " -config " + configFileUrl.getFile() +
View Full Code Here

    File dir = new File(FetionConfig.getString("crush.log.dir"));
    if(dir.isDirectory()) {
    }else if(dir.isFile()) {
      logger.warn("Crush log directory is a file...");
    }else {
      if(!dir.mkdir()) {
        logger.warn("Create crush log dir failed."+dir.getAbsolutePath());
        return;
      }
    }
    DateFormat df = new SimpleDateFormat("yyyy-M-d");
View Full Code Here

        // Create or overwrite the HTML file:
        String fileName = file.getName().substring(0, file.getName().length() - 4) + "txt";
        File htmlFile = new File(folder + fileName);
        File folderFile = new File(folder);
        folderFile.mkdir();
        FileOutputStream out = new FileOutputStream(htmlFile);
        out.write(blop.getBytes());
        out.flush();
        out.close();
      }
View Full Code Here

    File baseDir = new File(System.getProperty("java.io.tmpdir"));
    String baseName = System.currentTimeMillis() + "-";

    for (int counter = 0; counter < TEMP_DIR_ATTEMPTS; counter++) {
      File tempDir = new File(baseDir, baseName + counter);
      if (tempDir.mkdir()) {
        return tempDir;
      }
    }
    throw new IllegalStateException("Failed to create directory within "
        + TEMP_DIR_ATTEMPTS + " attempts (tried "
View Full Code Here

   private URL createExplodedArchive(Archive<?> archive) throws Exception
   {
      File file = new File("target/lib");
      if (file.exists())
         deleteFile(file);
      file.mkdir();
      File ear = new File(file, archive.getName());
      if (ear.exists())
         deleteFile(file);
      file = archive.as(ExplodedExporter.class).exportExploded(file);
     
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.