I have a situation where there are many different files in a folder. If any file inside that folder is modified, I want to changed the folder from unmodified to modified.
When a file inside the folder is changed, I could call something like this
theFolder.setAsModified();
But there is no such method. Is there any way to do this?
When the contents of the folder is modified, the folder.lastModified() returns the same old value (in Long value which is ms). I would like folder.lastModified() to return a new value (which would be a slightly greater number since it is more recent) when its contents are modified.
Thanks.
public boolean setLastModified (long time) did I was looking for.
Using it is as simple as:
fileOrFolder.setLastModified( yourDateInMilliseconds );