With Java 1.4 you can now set the date as well with File.setLastModified ( long timestamp )
I have written FileTimes a native class for windows that lets you get and set three of the file dates from Java.
You can examine the date with File.lastModified() and set it in Java 1.4+ with File.setLastModified()Windows keeps file timestamps accurate to 100 nanoseconds with 10,000 times as much precision as Java’s 1 ms. This means if you copy a file in Java, the new file might not have the exact same timestamp as the old. When you reconstitute a zipped file, its timestamp will be reconstituted accurate only to the even 2 seconds.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.18] | The information on this page is for non-military use only. | ||
| You are visitor number 30,025. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/Mindprod website mirror) | ||
| http://mindprod.com/jgloss/lastmodified.html | J:\mindprod\jgloss\lastmodified.html | ||