Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.app.Activity;

import java.io.File;

public class Main {
    public static void clearTemp(Activity activity) {
        File folder = new File(activity.getExternalFilesDir(null), "temp");
        if (null != folder.listFiles()) {
            for (File file : folder.listFiles()) {
                file.delete();
            }
        }
    }
}