Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: GNU General Public License 

import java.io.File;

import android.content.Context;

public class Main {
    public static void deleteExternalStoragePrivateFile(Context appCtx, String fileName) {
        // Get path for the file on external storage.  If external
        // storage is not currently mounted this will fail.
        File file = new File(appCtx.getExternalFilesDir(null), fileName);
        if (file != null) {
            file.delete();
        }
    }
}