last modified
Guys, I hope this is not too OT for this list but I am running out of ideas. What could be possibly be wrong with the following piece of code: import java.io.File; public class test { public static void main(String[] args) throws Exception { File dir = new File(dir); dir.mkdir(); long m = dir.lastModified(); File subdir = new File(dir, subdir); subdir.mkdir(); while(dir.lastModified() == m) { Thread.sleep(1000); System.out.print('.'); } subdir.delete(); dir.delete(); } } To me it seems like the last modified is not being updated (even if I re-create the File object) unless the directory gets touched *outside* the jvm. Anyone aware of this problem? cheers -- Torsten PGP.sig Description: This is a digitally signed message part
Re: last modified
Hi Torsten! public static void main(String[] args) throws Exception { File dir = new File(dir); dir.mkdir(); long m = dir.lastModified(); File subdir = new File(dir, subdir); This might have to do something with the timestamp resolution of the filesystem. Not every filesystem have a resolution of milliseconds but some higher factor. It gets ever worse e.g 10ms for FAT on create but 2sec for write (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/setting_and_getting_the_timestamp_of_a_file.asp) To be cross platform dont expect more than 2sec. Bad news, isnt it? --- Mario PS: After some googling I found it might be worth to collect those precision and create a web page with them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: last modified
This might have to do something with the timestamp resolution of the filesystem. Not every filesystem have a resolution of milliseconds but some higher factor. Yeah, Brett already pointed offlist me on that. It gets ever worse e.g 10ms for FAT on create but 2sec for write (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ fileio/fs/setting_and_getting_the_timestamp_of_a_file.asp) To be cross platform dont expect more than 2sec. Bad news, isnt it? Ouch! Hmm... need to think about what implications this might have for the jci monitor... Mario PS: After some googling I found it might be worth to collect those precision and create a web page with them. Sounds like a good idea Thanks -- Torsten PGP.sig Description: This is a digitally signed message part
[VOTE] Release Regexp 1.4
Hi All, With several recent bugfixes [1,2], and with previous release published almost two years ago [3], I think it is a good time to make a next, 1.4 release of the Jakarta Regexp. Please try out current svn (r232390) version [4] and test for any regressions, and vote for a release. My vote is +1. Thanks, Vadim [1] http://marc.theaimsgroup.com/?l=jakarta-regexp-devr=1b=200508 [2] http://jakarta.apache.org/regexp/changes.html [3] http://marc.theaimsgroup.com/?l=jakarta-regexp-devm=106260458007862 [4] http://svn.apache.org/repos/asf/jakarta/regexp/trunk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE] Release Regexp 1.4
In message [EMAIL PROTECTED], Vadim Gritsenko writes: and vote for a release. +1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE] Release Regexp 1.4
On Fri, 12 Aug 2005, Daniel F. Savarese wrote: In message [EMAIL PROTECTED], Vadim Gritsenko writes: and vote for a release. +1 +1, been noticing the commits :) Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]