Browse Source

Make ignoreFileTimes default to true in DifferentSelector to preserve backward compatibility

in the behavior of the selector and also make the selector more user friendly.
One expects that most users want to ignore file timestamps.
PR: 20205
Submitted by: Jeff Turner (jefft at apache dot org)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274615 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 22 years ago
parent
commit
88e204df81
2 changed files with 10 additions and 10 deletions
  1. +9
    -9
      docs/manual/CoreTypes/selectors.html
  2. +1
    -1
      src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java

+ 9
- 9
docs/manual/CoreTypes/selectors.html View File

@@ -271,8 +271,8 @@
<ol>
<li> If there is no 'other' file, it's different.
<li> Files with different lengths are different.
<li> Files with the same timestamp are the same, unless <tt>ignoreFileTimes</tt>
is set. This feature is useful to keep the selection fast.
<li> If <tt>ignoreFileTimes</tt> is turned off, then differing file
timestamps will cause files to be regarded as different.
<li> Finally a byte-for-byte check is run against the two files
</ol>

@@ -308,6 +308,13 @@
</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">ignoreFileTimes</td>
<td valign="top">Whether to use file times in the comparison or not.
Default is true (time differences are ignored).
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">granularity</td>
<td valign="top">The number of milliseconds leeway to give before
@@ -317,13 +324,6 @@
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">ignoreFileTimes</td>
<td valign="top">Whether to use file times in the comparison or not.
Default is false (time differences are significant).
</td>
<td valign="top" align="center">No</td>
</tr>
</table>

<p>Here is an example of how to use the Different Selector:</p>


+ 1
- 1
src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java View File

@@ -81,7 +81,7 @@ public class DifferentSelector extends MappingSelector {

private FileUtils fileUtils= FileUtils.newFileUtils();

private boolean ignoreFileTimes=false;
private boolean ignoreFileTimes=true;


/**


Loading…
Cancel
Save