开发者

getting the full path of R.raw folder

开发者 https://www.devze.com 2023-01-12 22:14 出处:网络
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

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 开发者_JAVA百科format.

any help will be appreciated.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消