Where to find files

My app stores parameters using the following statement,

local path = system.pathForFile( “mypara.txt”, system.DocumentsDirectory )

When uninstalling and installing the app again, the file mypara.txt survives. I want to remove this file completely, how can I find it on my Android device? Even if I enable hidden files in My Files to be shown, this file is still invisible.

You should be able to find any and all files in the documents directory via https://docs.coronalabs.com/api/library/lfs/index.html.

You can then run os.remove() on the files that you find and wish to remove.

Thanks for your response, XeduR. But I think you missed my point. I do not want to remove the file from within the app itself, but by using the standard Android file explorer after the app has been uninstalled.

I am not sure if you can remove a specific app’s data (without jailbreaking the device) if you’ve already uninstalled the app. This’d be a non-issue if you just wiped the data before uninstalling the app though.

There should be a “clear/optimise storage” option somewhere in your device’s settings that’ll clear all unused data from the device, and it should take care of all data for apps that are no longer installed on the device.

Thanks for your advice, I will try this.