This is my code:
File TempFiles = new File(Tempfilepath);
if (TempFiles.exists()) {
String[] child = TempFiles.list();
for (int i = 0; i < child.l
There is an alternate way. When you open the file for the first time save the lastModified date, before you modify the folder.
long createdDate =new File(filePath).lastModified();
And then when you close the file do
File file =new File(filePath);
file.setLastModified(createdDate);
If you have done this since the file was created, then you will have the createdDate as the lastModified date all the time.