Package java.io

Examples of java.io.File.mkdirs()


        currentlyBeingAdded.put(functionallyGroundedNode,
            componentDirectory.getNode());
      }

      File directory = componentDirectory.getDirectory();
      directory.mkdirs();
      // writeMetaInf(directory, componentDirectory.getNode(),
      // METAMODEL.FunctionallyGroundedNode, functionallyGroundedNode);
      File metaInfFile = new File(directory, "meta-inf");
      Model metaInfModel = ModelFactory.createDefaultModel();
      Resource componentRes = metaInfModel
View Full Code Here


      dir = File.createTempFile("teststore", "dir");
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    dir.delete();
    dir.mkdirs();
//new File("teststore");
//    if (dir.exists()) {
//      FSStoreTest.delDirContent(dir);
//    } else {
//      dir.mkdirs();
View Full Code Here

          "Another instance seems to be still running, if not delete "
              + lockFile);
    }
    lockFile.deleteOnExit();
    File moleculeStoreDir = new File(storeDir, "moleculestore");
    moleculeStoreDir.mkdirs();
    fsMoleculeStore = new FSMoleculeStore(moleculeStoreDir, cache);
    setMoleculeStore(fsMoleculeStore);
    File metaStoreFile = new File(storeDir, "meta-store.nt");
    Model metaModel = ModelFactory.createModelForGraph(new NTFileGraph(
        metaStoreFile));
View Full Code Here

    if(!baseURI.endsWith("/"))
      baseURI += "/";
    //�����洢�ϴ��ļ���Ŀ¼
    File fp = new File(diskPath);
    if(!fp.exists())
      fp.mkdirs();
  }

  /* (non-Javadoc)
   * @see com.liusoft.dlog4j.upload.UploadFileHandler#save(java.io.File)
   */
 
View Full Code Here

    String img_path = getPortraitPath(fileName.toString());
    File img = new File(img_path);
    File img_dir = img.getParentFile();
    if(!img_dir.exists()){
      synchronized(sync_portrait_upload){
        if(!img_dir.mkdirs())
          throw new IOException("Cannot make directory: " + img_dir.getParent());
      }
    }
    //�ж�ͼ��Ĵ�С��������Ҫ���е���
    BufferedImage orig_portrait = (BufferedImage)ImageIO.read(pFile.getInputStream());
View Full Code Here

    private static File backup(String sourcePath, String targetPath,
            String basePath, int max, String node) throws IOException {
        File root = new File(targetPath);
        if (!root.exists()) {
            root.mkdirs();
        }
        while (true) {
            File oldest = null;
            int count = 0;
            for (File f : root.listFiles()) {
View Full Code Here

    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

    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

  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

  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

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.