Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.content.Context;
import java.io.IOException;

public class Main {
    public static boolean fileExists(Context ctx, String filename) {
        try {
            for (String f : ctx.getAssets().list("")) {
                if (f.equals(filename))
                    return true;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return false;
    }
}