List of utility methods to do Create Directory
void | mkdirs(String fileName, String baseName) mkdirs String path = baseName + fileName.substring(0, fileName.lastIndexOf(File.separator));
new File(path).mkdirs();
|
boolean | mkdirs(String filePath) mkdirs File file = new File(filePath); boolean result = false; if (!file.exists()) { result = file.mkdirs(); return result; |
boolean | mkdirs(String filePath) mkdirs for a file; File file = new File(filePath); if (!file.exists()) { String parent = file.getParent(); return new File(parent).mkdirs(); } else { return false; |
Boolean | mkDirs(String filePath) mk Dirs String dirPath = new File(filePath).getParentFile().getAbsolutePath() + File.separator; File dir = new File(dirPath.replace("/", File.separator)); return dir.exists() || dir.mkdirs(); |
boolean | mkdirs(String name) Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. File file; if (name == null) { return false; file = new File(name); return file.mkdirs(); |
File | mkdirs(String packageName, File root) mkdirs String[] dirs = packageName.split("\\."); for (String dir : dirs) { File f = new File(root, dir); if (!f.exists()) { f.mkdir(); root = f; return root; |
boolean | mkdirs(String parentName, String childName) mkdirs return mkdirs(new File(parentName, childName)); |
void | mkDirs(String path) Create dirs (new File(path)).mkdirs();
|
void | mkdirs(String path) mkdirs if (path == null) { return; path = getJavaFileSystemPath(path); if (!path.endsWith(sp)) { path = path + sp; java.io.File dir = new java.io.File(path); ... |
void | mkdirs(String path, boolean deleteBeforeCreate) mkdirs File file = new File(path); if (deleteBeforeCreate) delete(file); file.mkdirs(); |