List of utility methods to do Create Directory
void | mkdirs(final File aDirectory) mkdirs boolean success; if (aDirectory.exists()) { success = aDirectory.isDirectory(); } else { success = aDirectory.mkdirs(); if (!success) { throw new IllegalArgumentException( ... |
void | mkdirs(final File dirs) Creates all folders at once. if (dirs.exists()) { if (!dirs.isDirectory()) { throw new IOException(MSG_NOT_A_DIRECTORY + dirs); return; if (!dirs.mkdirs()) { throw new IOException(MSG_CANT_CREATE + dirs); ... |
void | mkdirs(final File f) mkdirs if (f.exists() && !f.isDirectory()) throw new IOException(String.format("'%s' does already exist but is not a directory.", f)); if (!f.exists() && !f.mkdirs()) throw new IOException("Could not create folder '" + f + "'."); |
boolean | mkdirs(final File file) Creates the directory in privileged mode. return file.mkdirs();
|
void | mkdirs(final File outdir, final String path) Creates directories from an existing file to an additional path. File d = new File(outdir, path); if (!d.exists()) { d.mkdirs(); |
boolean | mkdirs(final String path) Creates a directory and parent directories if needed. return new File(path).mkdirs(); |
File | mkdirs(final String path) mkdirs final File file = new File(path); if (!file.exists()) { final File dir = new File(file.getParent()); if (!dir.exists()) { dir.mkdirs(); return file; ... |
void | mkdirs(String destDir) mkdirs File dir = new File(destDir); if (!dir.exists()) { dir.mkdirs(); |
void | mkdirs(String destination) Creates directory specified by destination, and all its parents if they don't exist. mkdirs(new File(destination));
|
boolean | mkdirs(String dirName) mkdirs File dirPath = new File(dirName); return dirPath.exists() || dirPath.mkdirs(); |