This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We're looking at deleting all files on a unix file system that haven't been used in x amount of time. Here's the code we currently use in our jsp:
The problem on unix is, if you touch the files to get the file's load date, it changes the access timestamp for the file. I can't find anything on how to read the timestamp via Java/jsp without changing any of the file's underlying information.
Thanks for your help.
[ March 25, 2007: Message edited by: Pat Flickner ] [ March 25, 2007: Message edited by: Bear Bibeault ]
Putting aside the fact that in this day and age you shouldn't be putting any code at all in a JSP, if it isn't about JSP technology, which this clearly is not, it isn't a JSP question.
Joined: Nov 17, 2003
Actually, I inherited the code, Bear, and to be quite honest, with the integration project and a myriad of real problems I've had to address, I haven't had the time to correct all past mistakes, although I have corrected quite a few. This one seemed very low priority considering the overhaul we've had to do. So if could you just ease up a teensy bit, I'd really appreciate it. I'm just looking for answers. If this piece of code were within a servlet -- which it will be eventually -- I would still have need of the answer. You will be pleased to know that a rewrite of this project, partly for the reason you very aptly point out.