how to prevent file from being deleted

i have an app wich i allow to read data from any folder (like the external sd card), to achiev it i create a txt inside the app folder with the path to the data folder, this works perfectly, but once i use any app to remove trash that file is marked for removal, that is not a serious problem, but it annoys me that it is possible to lose files because of this
is there anyway to set the file to never be considered trash ?
as i understand trash files are temp files, wich is not the case to game files

as another example to my problem, last day on earth seems to surfer with the same problem, once i run a memory cleaner the game must download almost all data again, at least they save it in the cloud, but as a counter example clash of clans never asked me to log again after a cleaning