I have a whole folder structure that I want to copy from my assets folder. However, the mContext.getAssets().open() seems to only want a filename so that it can return an InputStream, which is only suitable for copying a single file. What I need is a File made from the folder in my assets folder so that I can recurse through all the files and folders and copy them all.
Does anybody know how to get the path to the assets folder so that I can create a File object?
Edit: After some study it appears that you can't access files in the assets/ and raw/ folders with absolute paths to be able to create a File object. It probably has to do with the encryption of the app package. I hope someone can prove me wrong though!
Final edit: I ended up creating an array of strings to hold the extra asset files:
private static final String[] DEFAULT_ALBUM_FILES = {INTRO_TO_FLASHUM_DIR+"03 Never Can Say Goodbye.m4a", INTRO_TO_FLASHUM_DIR+"11 Bossa Baroque.m4a", INTRO_TO_FLASHUM_DIR+"intro fling.3gp"}; I then iterated through this copying each file individually using the mContext.getAssets().open() to get the InputStream. I don't think it is currently possible to iterate through a folder in the assets using normal File operations.