Android Asset Read listAssetFiles(Context context, String path)

Here you can find the source of listAssetFiles(Context context, String path)

Description

list Asset Files

Declaration

public static String[] listAssetFiles(Context context, String path) 

Method Source Code

//package com.java2s;

import android.content.Context;

public class Main {
    public static String[] listAssetFiles(Context context, String path) {
        String[] list;//from ww w  . j a  va2  s  .  c  o  m

        try {
            list = context.getAssets().list(path);
        } catch (Exception e) {
            return null;
        }

        return list;
    }
}

Related

  1. getFileFromAssets(Context context, String file)
  2. getImgFromAsserts(Context con, String filename)
  3. getfromAssets(Context ctx, String file_name)
  4. assetAsByteArray(Resources res, String path)