Android Question Configuration File in File.DirAssets

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to all
I have a txt file that must always be read by the app, when it starts, just like it were a configuration file. Therefore, I have copied it in "MyProject/Files" and added to the project with the IDE FileManager. I try to access it with:
B4X:
File.Exists(File.DirAssets, FileName)
but the function returns false.
I am wondering myself what I am missing..
Thanks
 

DonManfred

Expert
Licensed User
Longtime User
I am wondering myself what I am missing..
You can not use File.Exists on files in the Files.folder.

You know what files are there. Just use them. Note that you can not write to this File. Files in Assets are Readonly.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…