Android Context Check isFileExist(Context ctx, String filename)

Here you can find the source of isFileExist(Context ctx, String filename)

Description

is File Exist

Declaration

public static boolean isFileExist(Context ctx, String filename) 

Method Source Code

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

import android.content.Context;

public class Main {
    public static boolean isFileExist(Context ctx, String filename) {
        File rootDir = ctx.getFilesDir();
        if (rootDir.exists()) {
            File file = new File(rootDir, filename);
            return file.exists();
        }//from w ww .  j  a v  a2  s .com
        return false;
    }
}

Related

  1. isConnected(Context connext)
  2. isConnected(Context context)
  3. isDebugCertificateCheck(final Context context)
  4. isDebuggable(final Context context, final boolean includeDefaultDebugCertificateCheck)
  5. isExisting(Context context, Uri uri, String selection, String[] args)
  6. isFree(Context context)
  7. isGPRSAvailable(Context context)
  8. isGoogleAccountPresent(Context ctx)
  9. isGpsEnabled(Context context)