Examples of mkdirs()


Examples of java.io.File.mkdirs()

    private void testTransfer() throws Exception {
        Server server = new Server();
        server.setOut(new PrintStream(new ByteArrayOutputStream()));
        server.runTool("-web", "-webPort", "8182", "-properties", "null");
        File transfer = new File("transfer");
        transfer.mkdirs();
        try {
            FileOutputStream f = new FileOutputStream("transfer/test.txt");
            f.write("Hello World".getBytes());
            f.close();
            WebClient client = new WebClient();
View Full Code Here

Examples of java.io.File.mkdirs()

    boolean saveFiles = (saveInDir != null && saveInDir.trim().length() > 0);
    boolean isFile = false;
    if (saveFiles) { // Create the required directory (including parent
              // dirs)
      File f = new File(saveInDir);
      f.mkdirs();
    }
    line = getLine(is);
    if (line == null || !line.startsWith(boundary))
      throw new IOException("Boundary not found; boundary = " + boundary
          + ", line = " + line);
View Full Code Here

Examples of java.io.File.mkdirs()

  private org.rhq.core.pluginapi.content.version.PackageVersions loadPackageVersions() {
    if (this.versions == null) {
      ResourceType resourceType = resourceContext.getResourceType();
      String pluginName = resourceType.getPlugin();
      File dataDirectoryFile = resourceContext.getDataDirectory();
      dataDirectoryFile.mkdirs();
      String dataDirectory = dataDirectoryFile.getAbsolutePath();
      log.trace("Creating application versions store with plugin name [" //$NON-NLS-1$
          + pluginName + "] and data directory [" + dataDirectory //$NON-NLS-1$
          + "]"); //$NON-NLS-1$
      this.versions = new PackageVersions(pluginName, dataDirectory);
View Full Code Here

Examples of java.io.File.mkdirs()

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

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

  generateDir = props.getProperty(PROP_GENERATE_DIR, ".");
  Assert.assertNotNull("Property " + PROP_GENERATE_DIR
    + " was not specified", this.generateDir);
View Full Code Here

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

Examples of java.io.File.mkdirs()

      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

Examples of java.io.File.mkdirs()

    }

    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

Examples of java.io.File.mkdirs()

        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

Examples of java.io.File.mkdirs()

        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

Examples of java.io.File.mkdirs()

    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
TOP
Copyright © 2015 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.