A
Andrew Thompson
Now that I have released the JOLC
( http://www.physci.org/javac.jsp ),
I need a way to clear the directory of old
directories (each session gets it's own).
What would be the best strategy for deleting
any directories more than 24 hrs old?
My initial thoughts are to have a thread
running constantly (which, I am not sure
how to achieve), have it Thread.sleep for
24hrs, when it wakes up, get the creation
dates of all the target directories and delete
those more than 24hrs old.
Any better ways to approach the problem?
[ It's just that my approach seems 'hackish',
and I am not even sure how to keep the
'deleter' class loaded.. ]
( http://www.physci.org/javac.jsp ),
I need a way to clear the directory of old
directories (each session gets it's own).
What would be the best strategy for deleting
any directories more than 24 hrs old?
My initial thoughts are to have a thread
running constantly (which, I am not sure
how to achieve), have it Thread.sleep for
24hrs, when it wakes up, get the creation
dates of all the target directories and delete
those more than 24hrs old.
Any better ways to approach the problem?
[ It's just that my approach seems 'hackish',
and I am not even sure how to keep the
'deleter' class loaded.. ]