Package java.io

Examples of java.io.File.mkdir()


      File foo = new File(dirTest, "foo.dat");
      foo.createNewFile();
     
      File graphicsDir = new File(root, "graphicsDir");
      graphicsDir.mkdir();
     
      File graphicsSubDir = new File(graphicsDir, "subDir");
      graphicsSubDir.mkdir();
     
      File jpg = new File(graphicsSubDir, "testHipKro03test.jpg");
View Full Code Here


     
      File graphicsDir = new File(root, "graphicsDir");
      graphicsDir.mkdir();
     
      File graphicsSubDir = new File(graphicsDir, "subDir");
      graphicsSubDir.mkdir();
     
      File jpg = new File(graphicsSubDir, "testHipKro03test.jpg");
      jpg.createNewFile();

      File png = new File(graphicsSubDir, "testHipKro03test.png");
View Full Code Here

    String destinationFile = pathToIconsDir + "/" + resourceName;
   
    File iconsDir = new File(pathToIconsDir);
    if (!iconsDir.exists()) {
      logInfo("Icons directory ("+pathToIconsDir+") doesn't exist, so attempting to create it.");
      boolean result = iconsDir.mkdir();
      if (!result) {
        s_log.error("Failed to create icons directory ("+pathToIconsDir+")");
      }
    }   
   
View Full Code Here

        String jBase = System.getProperty("jonas.base");
        if (jBase == null) {
            throw new ResourceAdapterInternalException("No JONAS_BASE found, cannot continue.");
        }
        File workDir = new File(jBase + File.separator + Embedded.DEFAULT_DEPLOY_DIRECTORY);
        workDir.mkdir();

        // Add deploy directory
        this.embedded.getServerConfig().addDeployDirectory(workDir);

        // Use JOnAS 4.x MDB Helper
View Full Code Here

        byte[] bytes = GenerateClass.getByteForClass(fullClassName.replace('.', '/'), methodContent);

        // Dump this bytes to a classrugby chabal file (if done in memory the endpoint can't
        // get the bytes)
        File pkgDir = new File(this.tmpDir, packageName);
        pkgDir.mkdir();
        FileOutputStream fos = new FileOutputStream(new File(pkgDir, className + ".class"));
        fos.write(bytes);
        fos.close();

        // Try to find my class (that was generated at runtime !)
View Full Code Here

    IPath path = new Path(activator.getStateLocation().toOSString());
    path = path.append(ICONS_FOLDER);
    File root = new File(path.toOSString());
    if (!root.exists())
      res = root.mkdir();
    else
      res = true;

    path = path.append(fileName);
View Full Code Here

    }

    public static void createKioskRoom() {
        File bookMarksDirectory = new File(JBother.profileDir
                + File.separatorChar + "gcbookmarks");
        if (!bookMarksDirectory.isDirectory() && !bookMarksDirectory.mkdir()) {
            com.valhalla.Logger
                    .debug("Could not create kiosk bookmarks directory.");
            return;
        }
View Full Code Here

  public void setIndexDir(String indexDir)
  { File file = new File(indexDir);
    if (!file.exists())
     { indexDir = Constants.MUSTRU_HOME + Constants.fs + "data" + Constants.fs + indexDir;
       file = new File(indexDir); if (!file.exists()) file.mkdir();
     }
    paramHash.put("indexDir",  indexDir);
  }
 
  public String getDbDir()
View Full Code Here

  public void setDbDir(String dbDir)
  { File file = new File(dbDir);
    if (!file.exists())
      { dbDir = Constants.MUSTRU_HOME + Constants.fs + "data" + Constants.fs + dbDir;
        file = new File(dbDir); if (!file.exists()) file.mkdir();
     
    paramHash.put("dbDir",  dbDir);
  }
 
  public String getWebDir()
View Full Code Here

  public static void createFeedFolder(String feedFolder)
      throws DownloadException {

    File feedFolderFile = new File(feedFolder);
    if (!feedFolderFile.exists()) {
      if (feedFolderFile.mkdir()) {
        // sLog.info("...folder created: " + feedFolder);
      } else {
        // sLog.error("...can not create: " + feedFolder);
        throw new DownloadException("...can not create: " + feedFolder);
      }
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.