Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    private static final String PATH = "sdcard/Ancached_Browser/data/";

    public static void checkDir() {
        String sdState = android.os.Environment.getExternalStorageState();
        if (sdState.equals(android.os.Environment.MEDIA_MOUNTED)) {
            File dir = new File(PATH);
            if (!dir.exists()) {
                File dir2 = new File("sdcard/Ancached_Browser/");
                if (!dir2.exists()) {
                    dir2.mkdir();
                }
                dir.mkdir();
            }
        }
    }
}