Package java.io

Examples of java.io.File.mkdir()


    while (true) {       
      String[] indexs = Config.getInstance().getIndexNames();
      for( int i=0; i<indexs.length; i++ ) {
        File rep = new File( Config.getInstance().getIndexRoot(), indexs[i] );
        if( !rep.exists() ) {
          rep.mkdir();
        }
      }
      try {
        System.out.println("["+Thread.currentThread().getName()+"] ReIndexation");   
        Mapping.begin();
View Full Code Here


  static File createTempDirectory() throws IOException {
    File temp = File.createTempFile("temp", Long.toString(System.nanoTime()));

    temp.delete();

    if (!(temp.mkdir())) {
      throw new IOException("Could not create temp directory: "
          + temp.getAbsolutePath());
    }

    return temp;
View Full Code Here

      return;
    }
   
    File dialogSubDir = new File(wekaHome.toString() + File.separator + "systemDialogs");
    if (!dialogSubDir.exists()) {
      if (!dialogSubDir.mkdir()) {
        return;
      }
    }
   
    File dialogFile = new File(dialogSubDir.toString() + File.separator + dialogName);
View Full Code Here

      return;
    }
   
    File dialogSubDir = new File(wekaHome.toString() + File.separator + "systemDialogs");
    if (!dialogSubDir.exists()) {
      if (!dialogSubDir.mkdir()) {
        return;
      }
    }
   
    File dialogFile = new File(dialogSubDir.toString() + File.separator + dialogName);
View Full Code Here

    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    if (!cacheDir.exists()) {
      if (!cacheDir.mkdir()) {
        System.err.println("Unable to create repository cache directory ("
            + cacheDir.getAbsolutePath() + ")");
        CACHE_URL = null;
      } else {
        // refreshCache();
View Full Code Here

    final Properties prop = service.storeSettings();
    if (prop!=null) {
      String dir=Settings.getUserSettingsDirName();
      File f=new File(dir);
      if (!f.exists()) {
        f.mkdir();
      }
      f=new File(dir,service.getId()+".service");
      try {
        StreamUtilities.outputStream(f, new OutputStreamProcessor() {
          public void process(OutputStream outputStream) throws IOException {
View Full Code Here

              filePath = "."; //$NON-NLS-1$
          }
    }
    File scratchDirectory = new File(filePath);
        if(!scratchDirectory.exists()) {
            scratchDirectory.mkdir();
        }
      return filePath;
  }
 
  public static final <T extends Serializable> T helpSerialize(T object) throws IOException, ClassNotFoundException {
View Full Code Here

        }
       
        File targetDir = new File(targetDirectory.getAbsolutePath() + File.separatorChar + sourceDirectory.getName());
        if (includeSourceRoot) {
            // copy source directory
            targetDir.mkdir();
        } else {
            // copy only source directory contents
            targetDir = new File(targetDirectory.getAbsolutePath() + File.separatorChar);
        }
        File[] sourceFiles = sourceDirectory.listFiles();
View Full Code Here

        if(dataCluster == null) {
            throw new IllegalStateException("Initialization seems to be not called before");
        }
        File clusterDir = new File(dataCluster);
        if(!clusterDir.exists()) {
            boolean created = clusterDir.mkdir();
            if(!created) {
                throw new IllegalStateException("Creation of the cluster data '" + dataCluster
                        + "' is failed");
            }
        }
View Full Code Here

        System.out.println("[KnowledgeFlow] Saving user components....");
        File sFile = new File(WekaPackageManager.WEKA_HOME.getPath()
            + File.separator + "knowledgeFlow");

        if (!sFile.exists()) {
          if (!sFile.mkdir()) {
            System.err.println("[KnowledgeFlow] Unable to create \""
                + sFile.getPath() + "\" directory");
          }
        }
        try {
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.