Package java.io

Examples of java.io.File.mkdirs()


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

    }

    @Override
View Full Code Here


      String genDir) {
  String resultFileName = queryID + ".xml"; //$NON-NLS-1$

  String targetDirname = genDir + File.separator + querySetID; //$NON-NLS-1$
  File targetDir = new File(targetDirname);
  targetDir.mkdirs();

  return new File(targetDir, resultFileName);
    }

    //   
View Full Code Here

    }

    public void testStoreWithDirectoryInPlace() throws Exception {
        File testFile = new File(ROOT_DIR, TEST_FILENAME);
        assertFalse(testFile.exists());
        assertTrue(testFile.mkdirs());

        assertTrue(testFile.exists());
        assertFalse(client.storeFile(TEST_FILENAME, new ByteArrayInputStream(
                testData)));
View Full Code Here

        assertEquals(501, client.sendCommand("APPE"));
    }

    public void testAppendWithDirectoryInPlace() throws Exception {
        File testFile = new File(ROOT_DIR, TEST_FILENAME);
        testFile.mkdirs();

        assertTrue(testFile.exists());
        assertFalse(client.appendFile(TEST_FILENAME, new ByteArrayInputStream(
                testData)));
View Full Code Here

        return ConfigureUtil.configure(closure, this);
    }

    public File getTemporaryDir() {
        File dir = getServices().get(TemporaryFileProvider.class).newTemporaryFile(getName());
        dir.mkdirs();
        return dir;
    }

    private Action<Task> convertClosureToAction(Closure actionClosure) {
        actionClosure.setDelegate(this);
View Full Code Here

    public File mkdir(Object path) {
        File dir = fileResolver.resolve(path);
        if (dir.isFile()) {
            throw new InvalidUserDataException(String.format("Can't create directory. The path=%s points to an existing file.", path));
        }
        dir.mkdirs();
        return dir;
    }

    public boolean delete(Object... paths) {
        return deleteAction.delete(paths);
View Full Code Here

            for (DcModule module : DcModules.getModules()) {
              if (module.isSelectableInUI()) {
                  String path = DataCrow.reportDir + module.getName().toLowerCase().replaceAll("[/\\*%., ]", "");
                  File file = new File(path);
                  if (!file.exists())
                      file.mkdirs();
                 
                  folders.put(module.getIndex(), path);
              }
          }
      }
View Full Code Here

      File dir = new File(path);

      // create directory
      if (!dir.exists()) {
        dir.mkdirs();
      }

      File versionFile = new File(dir, "version");

      // if specified applet version already available don't download anything
View Full Code Here

     
      File f = manager.getDefaultWorkingDirectory( persist );
     
      if ( persist ){
     
        f.mkdirs();
      }
     
      String  name = FileUtil.convertOSSpecificChars( getName(), true );
     
      for (int i=0;i<1024;i++){
View Full Code Here

   
    if ( !f_result.exists()){
     
      if ( persist ){
     
        f_result.mkdirs();
      }
    }
   
    return( f_result );
  }
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.