Currently I have a mechanism that checks documents in and out of a system. If something has not been modified it will not check it in to the document management system. Unfortunately I've been zipping and unzipping files during this process now and any file that was unzipped/zipped has a new modified date instead of the actual modified date of the object.
Is there anyway in Java to determine the actual last time a file was opened and modified compared to being packaged?
Thanks!
Like this:
// when zipping:
ZipEntry e = ...
e.setTime(file.lastModified());
...
// when unzipping
File file = ...
file.setLastModified(e.getTime());