Package java.io

Examples of java.io.File.mkdirs()


     * @see jdlog.search.SearchProxy#getWriter()
     */
    protected static IndexWriter getWriter() throws IOException{
        File rp = new File(lucenePath);
        if(!rp.exists())
            rp.mkdirs();
        int wc = 0;
        while(wc<10 && IndexReader.isLocked(lucenePath)){
          try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
View Full Code Here


    this.path = path;
    if(this.path.endsWith(File.separator))
      this.path += File.separator;
    File f = new File(this.path);
    if(!f.exists())
      f.mkdirs();
  }
 
  /**
   * д������ʼ���������
   * @param sid
View Full Code Here

    String userDirectoryName = Settings.getUserSettingsDirName();
    File userDirectory = new File(userDirectoryName);

    // Create the user directory if it does not exist
    if (!userDirectory.exists()) {
      userDirectory.mkdirs();
    }

    item.getPlugin().saveSettings(userDirectory,!MainFrame.isShuttingDown());
  }
View Full Code Here

      if (dirName == null) {
        file = new File(dir, name);
      } else {
        File parentDir = new File(dir, dirName);
        if (!parentDir.exists()) {
          parentDir.mkdirs();
        }
        file = new File(parentDir, name);
      }
      FileOutputStream fos = new FileOutputStream(file);
      fos.write(buf);
View Full Code Here

        if (op.dirName == null) {
          file = new File(dir, op.name);
        } else {
          File parentDir = new File(dir, op.dirName);
          if (!parentDir.exists()) {
            parentDir.mkdirs();
          }
          file = new File(parentDir, op.name);
        }
        FileOutputStream fos = new FileOutputStream(file);
        fos.write(op.value);
View Full Code Here

                String outPath = out.substring(0,out.lastIndexOf(File.separatorChar));
                File dir = new File(outPath);
                if(dir.exists())
                    success = file.createNewFile();
                else{
                    dir.mkdirs();
                    success = file.createNewFile();
                }
            }
            if(success){
              if (m_useRelativePath) {
View Full Code Here

   * @return File path, never null
   */
  public static final String getTestScratchPath() {
    String filePath = DEFAULT_TEMP_DIR;
    File scratch = new File(filePath);
    if (!scratch.exists() && !scratch.mkdirs()) {
          filePath = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$

          if (filePath == null) {
              filePath = "."; //$NON-NLS-1$
          }
View Full Code Here

   */
   public static void write(InputStream is, File f, int bufferSize) throws IOException {
    f.delete();
    final File parentDir = f.getParentFile();
    if (parentDir !=null) {
      parentDir.mkdirs();
    }

    FileOutputStream fio = null;
    BufferedOutputStream bos = null;
        try {
View Full Code Here

  if (d.exists()) {
      FileUtils.removeDirectoryAndChildren(d);

  }
  if (!d.exists()) {
      d.mkdirs();
  }


  d = new File(generateDir, testname);
  generateDir = d.getAbsolutePath();
View Full Code Here

  d = new File(generateDir);
  if (d.exists()) {
      FileUtils.removeDirectoryAndChildren(d);
  }
  if (!d.exists()) {
      d.mkdirs();
  }

    }
   
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.