sajjoo
sajjoo

Reputation: 6614

getting the full path of R.raw folder

I have a binary file in the R.raw folder. Now I am able to get the file name and can read the file as well, but I need to find out the complete path of the file in string format.

any help will be appreciated.

Upvotes: 1

Views: 8587

Answers (1)

plugmind
plugmind

Reputation: 7986

So if you are able to get the file name you probably have a File object. If so call this method: http://developer.android.com/reference/java/io/File.html#getAbsolutePath%28%29

I think you should consider storing new files into your application data directory: http://developer.android.com/reference/android/content/ContextWrapper.html#getDir%28java.lang.String,%20int%29

Upvotes: 1

Related Questions