summaryrefslogtreecommitdiffstats
path: root/docs/manual/tasks/pathtofileset.html
blob: 52e9cb70ef434c615706c61cecbdf4a40e1188a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Ant-contrib Tasks: Pathtofileset</title>
  </head>

  <body>
    <h1>Pathtofileset</h1>

    <p>Coverts a path to a fileset. This is usefull if you have
      a path but need to use a fileset as input in a ant task.
      </p>

    <h2>Parameters</h2>
    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>Attribute</th>
        <th>Description</th>
        <th>Required</th>
      </tr>
      <tr>
        <td valign="top">dir</td>
        <td valign="top">The root of the directory tree of this FileSet</td>
        <td align="center" valign="top">Yes</td>
      </tr>
      <tr>
        <td valign="top">pathrefid</td>
        <td valign="top">The reference to the path to convert from</td>
        <td align="center" valign="top">Yes</td>
      </tr>
      <tr>
        <td valign="top">ignorenonrelative</td>
        <td valign="top">This boolean controls what will happen if any of the
          files in the path are not in the directory for the fileset. If this
          is "true" the files are ignored, if this is "false" a build exception
          is thrown. (Note: if files are not present no check is made).
        </td>
        <td align="center" valign="top">No, default is "false"</td>
      </tr>
      <tr>
        <td valign="top">name</td>
        <td valign="top">This is the identifier of the fileset to create. This
          fileset will contain the files that are relative to the directory root.
          Any files that are not present will not be placed in the set.
        </td>
        <td align="center" valign="top">Yes</td>
      </tr>
    </table>
  </body>
  <h2>Example</h2>
    <pre>
    &lt;outofdate outputsourcespath="modified.sources.path"&gt;
      &lt;sourcefiles&gt;
        &lt;fileset dir="a/b/c" includes="**/*.java"/&gt;
      &lt;/sourcefiles&gt;
      &lt;mapper dir="a/b/c" type="glob" from="*.java" to="output/*.xml"/&gt;
      &lt;sequential&gt;
        &lt;pathtofileset name="modified.sources.fileset"
                       pathrefid="modified.sources.path"
                       dir="a/b/c"/&gt;
        &lt;copy todir="output"&gt;
          &lt;fileset refid="modified.sources.fileset"/&gt;
          &lt;mapper type="glob" from="*.java" to="*.xml"/&gt;
        &lt;/copy&gt;
      &lt;/sequential&gt;
    &lt;/outofdate&gt;
    </pre>

    <hr>
    <p align="center">Copyright &copy; 2003 Ant-Contrib Project. All
    rights Reserved.</p>

</html>