Package java.io

Examples of java.io.File.mkdir()


      // Create a temp directory
      // NOTE: We copy to a temp directory and rename it when we are finished.
      File tempDir = new File(mBreakpointIndexDir.getAbsolutePath() + "_tmp");
      RegainToolkit.deleteDirectory(tempDir);
      tempDir.mkdir();

      // Copy the current working index to the breakpoint directory
      RegainToolkit.copyDirectory(mTempIndexDir, tempDir, false);

      // Delete the old breakpoint if it exists
View Full Code Here


  }

  public boolean createDatabase(String name, String username, IPassword password) {
    File databaseDir = new File(this.dataDirectory, name);
    if (databaseDir.exists()) return false;
    return databaseDir.mkdir();
  }

  public IDataSourceDescriptor createDescriptor(String name, String databaseName, String username) {
    return new DataSourceDescriptorStandard(name, "com.mysql.jdbc.Driver", this.createConnectionURL(databaseName), username);
  }
View Full Code Here

    boolean success = false;
    int numTries = 0;
    while ( numTries < 5 )
    {
      newDir = new File( directory, prefix + "." + rand.nextInt( 1000000) );
      if ( newDir.mkdir())
      {
        success = true;
        break;
      }
      numTries++;
View Full Code Here

    try {
      File tempFile = File.createTempFile(prefix, "", directory);

      if (!tempFile.delete())
        return null;
      if (!tempFile.mkdir())
        return null;

      return tempFile;

    } catch (Exception e) {
View Full Code Here

      root = createTempDir("UtilFindFileTest");

      Globals.prefs.put("pdfDirectory", root.getPath());
   
      File subDir1 = new File(root, "Organization Science");
      subDir1.mkdir();

      File pdf1 = new File(subDir1, "HipKro03 - Hello.pdf");
      pdf1.createNewFile();

      File pdf1a = new File(root, "HipKro03 - Hello.pdf");
View Full Code Here

      File pdf1a = new File(root, "HipKro03 - Hello.pdf");
      pdf1a.createNewFile();

      File subDir2 = new File(root, "pdfs");
      subDir2.mkdir();

      File subsubDir1 = new File(subDir2, "sub");
      subsubDir1.mkdir();

      File pdf2 = new File(subsubDir1, "HipKro03-sub.pdf");
View Full Code Here

      File subDir2 = new File(root, "pdfs");
      subDir2.mkdir();

      File subsubDir1 = new File(subDir2, "sub");
      subsubDir1.mkdir();

      File pdf2 = new File(subsubDir1, "HipKro03-sub.pdf");
      pdf2.createNewFile();

      File dir2002 = new File(root, "2002");
View Full Code Here

      File pdf2 = new File(subsubDir1, "HipKro03-sub.pdf");
      pdf2.createNewFile();

      File dir2002 = new File(root, "2002");
      dir2002.mkdir();

      File dir2003 = new File(root, "2003");
      dir2003.mkdir();

      File pdf3 = new File(dir2003, "Paper by HipKro03.pdf");
View Full Code Here

      File dir2002 = new File(root, "2002");
      dir2002.mkdir();

      File dir2003 = new File(root, "2003");
      dir2003.mkdir();

      File pdf3 = new File(dir2003, "Paper by HipKro03.pdf");
      pdf3.createNewFile();

      File dirTest = new File(root, "test");
View Full Code Here

      File pdf3 = new File(dir2003, "Paper by HipKro03.pdf");
      pdf3.createNewFile();

      File dirTest = new File(root, "test");
      dirTest.mkdir();

      File pdf4 = new File(dirTest, "HipKro03.pdf");
      pdf4.createNewFile();

      File pdf5 = new File(dirTest, ".TEST");
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.