Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

Changing a File's last_accessed_time from a servlet?

Jeremy W. Redmond

2003-07-15

Replies:

Ok... this may not exactly be a servlet-interest question, but I AM trying to do this from a servlet, so I guess I can get away with the question without getting flamed to bad.

I am trying to perform an action exactly like that of the UNIX "touch -a" command. However, I cannot actually run that command. (That was my first thought) Our System Admin. does not want us to do any direct OS commands.

Anyway, I know File.setLastModified() exists. Is there anything that I can set the last time that the file was accessed?

As to WHY I need to do this... when one of the servers in the cluster fails over to another, it does not record the last time the file was accessed. Certain processes need to know this information.


Thanks in advance.

Jeremy Redmond
Java Developer
NYS Department Of Health

___________________________________________________________________________
To unsubscribe, send email to listserv@(protected)
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html



©2008 junlu.com - Jax Systems, LLC, U.S.A.