Java Utililty Methods mkdir

List of utility methods to do mkdir

Description

The list of methods to do mkdir are organized into topic(s).

Method

intmakeDir(File file)
make Dir
int rtn = 0;
if (file.exists())
    return 0;
if (file.isFile())
    return 0;
if (file.isDirectory())
    return 0;
if (!file.isDirectory())
...
FilemakeDir(File parentDir, String dirName)
This can only create a directory in an existing parent directory (meaning, it won't create any ancestor directories if they don't exist).
return makeDir(parentDir, dirName, false);
voidmakeDir(File parentFile)
make Dir
Stack<File> fileStack = new Stack<File>();
while (!parentFile.exists()) {
    fileStack.push(parentFile);
    parentFile = parentFile.getParentFile();
while (!fileStack.empty()) {
    File newFile = fileStack.pop();
    newFile.mkdir();
...
booleanmakedir(String containerDir, String name)
Create a directory.
return (new File(containerDir + "/" + name)).mkdir();
voidmakeDir(String dir)
net.ajaskey.market.ta.makeDir
final File theDir = new File(dir);
if (!theDir.exists()) {
    theDir.mkdir();
voidmakeDir(String dir)
make Dir
File folder = new File(dir);
if (!folder.exists() || !folder.isDirectory()) {
    folder.mkdirs();
booleanmakeDir(String dir)
make Dir
return makeDir(dir, false);
booleanmakeDir(String dir)
make Dir
if (new File(dir).exists() && new File(dir).isDirectory())
    return true;
else
    return new File(dir).mkdir();
voidMakeDir(String dirName)
Make Dir
File dir = new File(dirName);
if (!dir.exists()) {
    boolean result = dir.mkdirs();
    if (!result) {
        System.out.println("Directory cannot be created: " + dirName);
booleanMakeDir(String dirpath)
Creates the directory if it does not exist
File baseDir = new File(dirpath);
if (!baseDir.exists())
    if (!baseDir.mkdir())
        return false;
return true;