create nested Directory - Android java.io

Android examples for java.io:Directory

Description

create nested Directory

Demo Code


//package com.java2s;
import java.io.File;

public class Main {

    public static boolean createDirs(String dirPath) {
        File file = new File(dirPath);
        if (!file.exists() || !file.isDirectory()) {
            return file.mkdirs();
        }/*from w w  w . j  a  v a2s .c o m*/
        return true;
    }
}

Related Tutorials