aspose file tools
The moose likes Android and the fly likes Create file object for each assets item. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Create file object for each assets item." Watch "Create file object for each assets item." New topic
Author

Create file object for each assets item.

Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
Hi friends,

I have specific requirement I have few files in assets folder. I want that file in File object. (This is the requirement and I need to follow them STRICTLY,InputStream or any other is not allowed).

How to convert that ? SO far I have tried


but this does not work.

Any Help..

If I can achieve the same using raw folder,that is also fine for me.
Vishal Trivedi
Ranch Hand

Joined: Sep 05, 2011
Posts: 57
i am not quite sure but i think AssetManager has method called
String[] list(String path) (Thats because have never used it but i remember this 1)
So you can use getAsset() to get the assetManager and call this method
using this list you can get File object of your specific intrest.
Let me know if it works....

Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
Very true Vishal.

It gives list of all file's name. But what I want is path. File class takes absolute path in constructor's parameter. So my question is how to get absolute path of assets folder.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Create file object for each assets item.
 
Similar Threads
How to read a doc file in the assets folder
Multi Files Transfer from client machines to server machines using socket communication in java
Read contents of jar file given specific path
Help
How to access and open an existing SQLite database (in Eclipse/Emulator)