• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps get file path

jessPHP

Newbie
Hi everyone!!


I have a txt file that I want to open for reading in android, using a File object.
I put the file in
 
Hi x3manaic!!! thanks for reply. I would be very happy if I was able to know the size of the file. The Class File has a method
 
Hi x3manaic! The api documentation about in.available() says:

"it provides such a weak guarantee that it is not very useful in practice" and " if you're reading from a file, length() returns the current length of the file (though assuming the file's length can't change may be incorrect, reading a file is inherently racy)"

Anyway, as the file is a static file, and its length will never change (during execution) maybe in.available suits me perfectly.

But if you find a way to get a File object on Android from a path, let me know about that.

if you like, remember to thank me!

I thought I told you "Hi x3manaic!!! thanks for reply". I have asked a lot of questions in forums and always thank people who answer my questions. Maybe I did not express myself clearly because my language is not English.

Anyway I want to thank you for all your help. I promise I am telling you the truth. And I am very very sorry for the misunderstanding.

Warm Regards x3manaic!!
 
Back
Top Bottom