diff --git a/docs/manual/CoreTypes/selectors.html b/docs/manual/CoreTypes/selectors.html index 5fa1671c0..501834e64 100755 --- a/docs/manual/CoreTypes/selectors.html +++ b/docs/manual/CoreTypes/selectors.html @@ -49,6 +49,8 @@ elsewhere
  • <depth> - Select files that appear so many directories down in a directory tree +
  • <different> - Select files + that are different from those elsewhere
  • <filename> - Select files whose name matches a particular pattern. Equivalent to the include and exclude elements of a patternset. @@ -58,7 +60,6 @@ that are larger or smaller than a particular number of bytes. -

    Contains Selector

    @@ -189,7 +190,7 @@ The number of milliseconds leeway to give before deciding a file is out of date. This is needed because not every file system supports tracking the last modified time to the - millisecond level. Default is 0 milliseconds. + millisecond level. Default is 0 milliseconds, or 2 seconds on DOS systems. No @@ -250,6 +251,83 @@

    Selects all files in the base directory and one directory below that.

    + +

    Different Selector

    + +

    The <different> tag selects files + who are deemed to be 'different' from another, equivalent file in + another location. The rules for determining difference between two + files are as follows: +

      +
    1. If there is no 'other' file, it's different. +
    2. Files with different lengths are different. +
    3. Files with the same timestamp are the same, unless ignoreFileTimes + is set. This feature is useful to keep the selection fast. +
    4. Finally a byte-for-byte check is run against the two files +
    + + This is a useful selector to work with programs and tasks that don't handle + dependency checking properly; Even if a predecessor task always creates its + output files, followup tasks can be driven off copies made with a different selector, + so their dependencies are driven on the absolute state of the files, not just + a timestamp. For example: anything fetched from a web site, or the output of + some program. To reduce the amount of checking, when using this task inside + a <copy> task, set the preservelastmodified to propagate the timestamp + from source file to destintaion file. + + +

    + + The <different> tag supports the use of a + contained <mapper> element + to define the location of the file to be compared against. If no + <mapper> element is specified, the + identity type mapper is used.

    + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    targetdirThe base directory to look for the files to compare + against. The precise location depends on a combination of this + attribute and the <mapper> element, if any. + Yes
    granularityThe number of milliseconds leeway to give before + deciding a file is out of date. This is needed because not every + file system supports tracking the last modified time to the + millisecond level. Default is 0 milliseconds, or 2 seconds on DOS systems. + No
    ignoreFileTimesWhether to use file times in the comparison or not. + Default is true. + No
    + +

    Here is an example of how to use the Different Selector:

    + +
    +<fileset dir="${ant.1.5}/src/main" includes="**/*.java">
    +    <different targetdir="${ant.1.4.1}/src/main"
    +        ignoreFileTimes="true"/>
    +</fileset>
    +
    + +

    Compares all the Java source files between the 1.4.1 and the 1.5 release + and selects those who are different, disregarding file times. +

    Filename Selector