stevel 2003/09/06 00:03:33 Modified: src/main/org/apache/tools/ant/util FileUtils.java src/main/org/apache/tools/ant/types/selectors MappingSelector.java Log: factored out the FAT granularity constant into FileUtils, though I am sure it is used in many other places. Revision Changes Path 1.55 +13 -1 ant/src/main/org/apache/tools/ant/util/FileUtils.java Index: FileUtils.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FileUtils.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- FileUtils.java 22 Aug 2003 15:25:45 -0000 1.54 +++ FileUtils.java 6 Sep 2003 07:03:33 -0000 1.55 @@ -111,6 +111,11 @@ private static char[] escapedChar1 = new char[256]; private static char[] escapedChar2 = new char[256]; + /** + * the granularity of timestamps under FAT + */ + public static final long FAT_FILE_TIMESTAMP_GRANULARITY=2000; + // stolen from FilePathToURI of the Xerces-J team static { @@ -1328,5 +1333,12 @@ } } + public long getFileTimestampGranularity() { + if(Os.isFamily("dos")) { + return FAT_FILE_TIMESTAMP_GRANULARITY; + } else { + return 0; + } + } } 1.7 +2 -3 ant/src/main/org/apache/tools/ant/types/selectors/MappingSelector.java Index: MappingSelector.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/MappingSelector.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- MappingSelector.java 29 Jul 2003 08:37:18 -0000 1.6 +++ MappingSelector.java 6 Sep 2003 07:03:33 -0000 1.7 @@ -59,6 +59,7 @@ import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.util.IdentityMapper; import org.apache.tools.ant.util.FileNameMapper; +import org.apache.tools.ant.util.FileUtils; import java.io.File; @@ -78,9 +79,7 @@ * */ public MappingSelector() { - if (Os.isFamily("dos")) { - granularity = 2000; - } + granularity=(int) FileUtils.newFileUtils().getFileTimestampGranularity(); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]