ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <stev...@iseran.com>
Subject timestamp checking
Date Wed, 21 Apr 2004 17:04:17 GMT

I am thinking we can and should factor out all timestamp checking into 
one place, like FileUtils and FileSet.

1. lots of code (JarSigner, uptodate) dont use the file system 
granularity at all when checking file ages.

recommendation: some method

boolean FileUtils.IsUpTodate(source,dest,granularity) ...

and
FileUtils.IsUpTodate(source,dest) {
  return IsUpToDate(source,dest,getFileTimestampGranularity())
}

2. There are a few places where code bulk checks filesets/filelists for 
age compared to a source file. If we factor it out, we get to keep all 
the logic in one place for better flexibility.


Incidentally, on that granularity discussion yesterday. There is a 
platform independent way to determine this: experimentation. Just set 
the timestamp of a file repeatedly to work out the minimum acceptable 
granularity for setLastModified() getLastModified().

-steve



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message