Sorry to chime in late on this. A couple of things to note:

* File.setLastModified() returns a boolean indicating whether or not the operation succeeded. Neither touch() nor testTouch() check the return value.

* The resolution of Win9x file system timestamps isn't quite what you'd expect. I haven't worked with this stuff for quite a while now, but if my memory serves me correctly, only even millisecond values are returned, so if you set an odd value, you wouldn't get back what you set.

Just wanted to add my 2 cents...

--
Martin Cooper


On Thu, 15 Jul 2004, Stephen Colebourne wrote:

I just ran the IO tests on JDK1.4.1 on Windows, and the FileUtils.touch()
test failed.

There was 1 failure:
1)
testTouch(org.apache.commons.io.FileUtilsTestCase)junit.framework.AssertionF
ailedError: Set lastModified to 0. expected:<0> but was:<1089878988000>
at
org.apache.commons.io.FileUtilsTestCase.testTouch(FileUtilsTestCase.java:464
)

This uses  file.setLastModified(long)
Has anyone else seen issues with file.setLastModified(long) on Windows ????

Stephen


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to