Package java.io

Examples of java.io.File.mkdir()


        newWorkingPath = getWorkingLocation(newWorkingLocation, newWorkingVector);
        // gets the new working location of the folder to be duplicated
        filDuplicate = new File(newWorkingPath + PATH_SEPERATOR + getNewFolderName());

        if (!filDuplicate.mkdir())// creates the folder which needs to be
          // duplicated
          throw new CvFileException(CvFileException.COULD_NOT_CREATE_DIRECTORY, "Could not create Directory");

        newWorkingPath = newWorkingPath + PATH_SEPERATOR + getNewFolderName() + PATH_SEPERATOR;
View Full Code Here


          if (strFiles[i].isDirectory()) {
            curWorkPath = curWorkDir + strFiles[i].getName() + PATH_SEPERATOR;

            File createDir = new File(newWorkDir + strFiles[i].getName());

            if (!createDir.mkdir())
              throw new CvFileException(CvFileException.COULD_NOT_CREATE_DIRECTORY, "Could not create Directory");
            else {
              newWorkPath = newWorkDir + strFiles[i].getName() + PATH_SEPERATOR;
              //                  call the recursive folders (source,destination)
              if (!duplicateRecursiveFolder(curWorkPath, newWorkPath))
View Full Code Here

            tmpFile = File.createTempFile("gradle_ivy_cache_" + getName(), "");
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
        tmpFile.delete();
        tmpFile.mkdir();
        DeleteOnExit.addFile(tmpFile);
        return tmpFile;
    }
}
View Full Code Here

       
    File  root_dir = new File( SystemProperties.getUserPath() + "rss" );
   
    if ( !root_dir.exists()){
     
      root_dir.mkdir();
    }
   
    Integer  rss_port;
    String  rss_access;
   
View Full Code Here

    float percentageParts = 20f/nativeJarCount; // parts for each native jar from 20%
   
    // create native folder
    File nativeFolder = new File(path + "natives");
    if (!nativeFolder.exists()) {
      nativeFolder.mkdir();
    }
   
    // get the current certificate to compare against native files
    Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates();
View Full Code Here

   * @throws IOException
   */
  public WGADeployment createDeployment(String name, File wgaWar, IProgressMonitor monitor, boolean forceUpdate) throws ZipException, IOException {
    File deploymentDir = new File(_baseDir, name);
    if (!deploymentDir.exists()) {
      deploymentDir.mkdir();
    }
    WGADeployment deployment = new WGADeployment(deploymentDir);
    if (forceUpdate || !deployment.isDeployed()) {
      deployment.updateWGA(wgaWar, monitor);
    }
View Full Code Here

   * @throws ZipException
   */
  public WGADeployment createDeployment(IProject project, IProgressMonitor monitor) throws ZipException, IOException {
    File deploymentDir = new File(_baseDir, project.getName());
    if (!deploymentDir.exists()) {
      deploymentDir.mkdir();
    }
    WGADeployment deployment = new WGADeployment(deploymentDir);
    if (!deployment.isDeployed()) {
      deployment.updateWGA(project.getFolder("WebContent").getLocation().toFile(), monitor);
    }
View Full Code Here

 
      monitor.setTaskName("Deploying wga from location '" + wgaWarOrFolder.getAbsolutePath()  + "'.");
      // deploy wga
      File target = getDeployDir();
      if (!target.exists()) {
        target.mkdir();
        if (wgaWarOrFolder.isFile() && wgaWarOrFolder.getName().endsWith(".war")) {
          FileUtils.unzip(wgaWarOrFolder, target);
        } else if (wgaWarOrFolder.isDirectory()){
          WGUtils.copyDirContent(wgaWarOrFolder, target);
        }
View Full Code Here

        ((FTPSClient) client).execPROT("P");
        assertTrue(getActiveSession().getDataConnection().isSecure());

        File dir = new File(ROOT_DIR, "dir");
        dir.mkdir();

        client.listFiles(dir.getName());
    }

    public void testReceiveEmptyFile() throws Exception {
View Full Code Here

            throw new IllegalStateException("Collection does not exist: "
                    + colDir.getAbsolutePath());
        }
        File idxDir = new File(colDir, INDEX_DIR_NAME);
        if(!idxDir.exists()) {
            boolean created = idxDir.mkdir();
            if(!created) {
                throw new IllegalStateException("Could not create an index directory: "
                        + idxDir.getAbsolutePath());
            }
        }
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.