Android Utililty Methods Directory Create

List of utility methods to do Directory Create

Description

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

Method

Stringmkdir(String s)
Creates the directory s (and any parent directories needed).
try {
    if ((new File(s)).mkdirs())
        return "Created dir: " + s;
    else
        return "Failed to create dir or dir already exists: " + s;
} catch (Exception e) {
    return e.toString();
voidmkdirs(String pathName)
mkdirs
File file = new File(pathName);
file.mkdirs();
voidmkdirs(String pathName)
mkdirs
File file = new File(pathName);
file.mkdirs();
voidcreateDir(String path, String folder)
create Dir
File f = new File(path + folder);
if (!f.isDirectory()) {
    f.mkdirs();
voidcreateDirectory(String directory, String subDirectory)
create Directory
String dir[];
File fl = new File(directory);
try {
    if (subDirectory == "" && fl.exists() != true)
        fl.mkdir();
    else if (subDirectory != "") {
        dir = subDirectory.replace('\\', '/').split("/");
        for (int i = 0; i < dir.length; i++) {
...