List of utility methods to do mkdir
File | makeDirectory(final File file, final String extension) make Directory String name = file.getName(); name = capitalizeFirstLetter(name); name = name.replace(".gz", ""); name = name.replace(".zip", ""); name = removeExtension(name); final File dir = new File(file.getParentFile(), name + extension); dir.mkdir(); return dir; ... |
void | makeDirectory(String directory) Makes the given directory if it not yet exists. File dir = new File(directory); if (!dir.exists()) dir.mkdir(); else if (!dir.isDirectory()) System.err.println("'" + directory + "' exists but is not a directory"); |
void | makeDirectory(String directoryName) Creates a directory given a directory name. File directory = new File(directoryName); if (!directory.exists()) { boolean directoryCreated = directory.mkdir(); assert directoryCreated : "Could not create output directory!"; |
boolean | makeDirectory(String directoryPath) Makes a directory in the given path. File theDir = new File(directoryPath); boolean result = false; if (theDir.exists()) { try { theDir.delete(); theDir.mkdir(); result = true; } catch (SecurityException se) { ... |
boolean | makeDirectory(String dirPath) make Directory boolean isOk = true; File file = new File(dirPath); if (!file.exists()) { isOk = file.mkdirs(); return isOk; |
void | MakeDirectory(String name) Make Directory File dir = new File(name); if (dir.isFile()) dir.delete(); if (!dir.exists()) dir.mkdir(); |
void | makeDirectory(String name) Creates a directory relative to codebase, which is typically either the jar or location of the package folders. File dir = new File(name); if (dir.isFile()) dir.delete(); if (!dir.exists()) dir.mkdir(); |
void | makeDirectory(String newDirString) make Directory File file = new File(newDirString); if (!file.exists()) { if (file.mkdir()) { System.out.println("\ninfo: Directory was created!\n"); } else { System.out.println("\nerror: Failed to create directory!\n"); |
void | makeDirectory(String outputDirectory, String directoryName) make Directory new File(outputDirectory, directoryName).mkdirs();
|
boolean | makeDirectory(String path) make Directory return new File(path).mkdirs(); |