Package java.io

Examples of java.io.File.mkdirs()


      String genDir) {
  String resultFileName = queryID + ".txt"; //$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


     
      File f = File.createTempFile( PREFIX, SUFFIX, tmp_dir );
     
      f.delete();
     
      if ( f.mkdirs()){
       
        return( f );
      }
    }
   
View Full Code Here

                             Map<Content, String> contentEntries) throws IOException, InterruptedRecorderException {
    if (!offlineFurnitureLibrary && furnitureResourcesLocalDirectory != null) {
      // Check local directory
      File directory = new File(furnitureResourcesLocalDirectory);
      if (!directory.exists()) {
        if (!directory.mkdirs()) {
          throw new IOException("Can't create directory " + directory);
        }
      } else if (!directory.isDirectory()) {
        throw new IOException(directory + " isn't a directory");
      }
View Full Code Here

            // We don't get "File name too long" on getCanonicalPath
            // unless the dir is there
            // I Wonder if we should remove the dirs after using them
            // FMFileImpl will create dirs again
            parentFile.mkdirs();

            File newFile = null;
            boolean first = true;
            while (name.length() > 50) {
              try {
View Full Code Here

   {
      File dir1 = new File(loc1);
      File dir2 = new File(loc2);

      if (!dir1.exists()) dir1.mkdirs();
      if (!dir2.exists()) dir2.mkdirs();
   }

   protected void configureCache(CacheSPI cache) throws Exception
   {
      cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(loc1, loc2));
View Full Code Here

            if (StringUtils.isNullOrEmpty(folder)) {
                parentFile = new File(System.getProperty("user.dir"));
            } else {
                parentFile = new File(folder);
            }
            parentFile.mkdirs();
            Pattern p = Pattern.compile("class ([a-zA-Z0-9]+)");
            for (String model : models) {
                Matcher m = p.matcher(model);
                if (m.find()) {
                    String className = m.group().substring("class".length()).trim();
View Full Code Here

      StringBuffer path = new StringBuffer(_baseIndexPath);
      path.append(name);
      String index_path = path.toString();
        File rp = new File(index_path);
        if(!rp.exists())
            rp.mkdirs();
        int wc = 0;
        //waiting for the lock of indexes
        while(wc<10 && IndexReader.isLocked(index_path)){
          try {
        Thread.sleep(100);
View Full Code Here

      else
         defaultUploadLimitMB_ = Integer.parseInt(params.getValueParam("upload.limit.size").getValue());
      uploadLocation_ = tmpDir + "/" + pinfo.getContainerName() + "/eXoUpload";
      File uploadDir = new File(uploadLocation_);
      if (!uploadDir.exists())
         uploadDir.mkdirs();
   }

   public void createUploadResource(HttpServletRequest request) throws IOException
   {
      String uploadId = request.getParameter("uploadId");
View Full Code Here

   */
  private NamedNode storeMolecule(Molecule molecule, Resource type)
      throws IOException {
    ComponentDirectory componentDirectory = new ComponentDirectory();
    File directory = componentDirectory.getDirectory();
    if (!directory.mkdirs()) {
      throw new IOException("Failed to create directory: " + directory);
    }
    writeMetaInf(directory, componentDirectory.getNode(), type, molecule);
    writeGraph(directory, molecule);
    return componentDirectory.getNode();
View Full Code Here

      ntCurrentlyBeingAdded.put(molecule, componentDirectory.getNode());
    }
    result = getNameOfMolecule(molecule, METAMODEL.NonTerminalMolecule);
    if (result == null) {
      File directory = componentDirectory.getDirectory();
      directory.mkdirs();
      writeMetaInf(directory, componentDirectory.getNode(),
          METAMODEL.NonTerminalMolecule, molecule);
      writeGraph(directory, molecule);
      result = componentDirectory.getNode();
      synchronized (ntCurrentlyBeingAdded) {
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.