Java examples for File Path IO:Directory Create
create Folder
//package com.java2s; import java.io.File; public class Main { public static void main(String[] argv) throws Exception { String folderPath = "java2s.com"; System.out.println(createFolder(folderPath)); }// w ww.ja va2 s. c o m public static boolean createFolder(String folderPath) { File outputFolder = new File(folderPath); if (outputFolder.exists()) return true; return outputFolder.mkdir(); } }