I’m storing my document files in iOS document directory for using while offline. If I want to upload the drafted files within a few hours I can upload the files but if I go to upload the drafted files on the next day the files get lost/deleted automatically. Is there any reason for which the files are getting deleted automatically?
To create folder into document directory:
final Directory? documentDirectory = await getApplicationDocumentsDirectory();
final fileDirectory = await Directory('${documentDirectory !.path}/$FolderName');
if(!(await fileDirectory.exist())){
fileDirectory.create(recursive: true);
}
Last day I’ve stored below three files.
Today I’ve found one file is missing from directory(440.docx).
What is the reason behind this? Need help…