| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>Ant-contrib Tasks: Pathtofileset</title> |
| 5 | </head> |
| 6 | |
| 7 | <body> |
| 8 | <h1>Pathtofileset</h1> |
| 9 | |
| 10 | <p>Coverts a path to a fileset. This is usefull if you have |
| 11 | a path but need to use a fileset as input in a ant task. |
| 12 | </p> |
| 13 | |
| 14 | <h2>Parameters</h2> |
| 15 | <table border="1" cellpadding="2" cellspacing="0"> |
| 16 | <tr> |
| 17 | <th>Attribute</th> |
| 18 | <th>Description</th> |
| 19 | <th>Required</th> |
| 20 | </tr> |
| 21 | <tr> |
| 22 | <td valign="top">dir</td> |
| 23 | <td valign="top">The root of the directory tree of this FileSet</td> |
| 24 | <td align="center" valign="top">Yes</td> |
| 25 | </tr> |
| 26 | <tr> |
| 27 | <td valign="top">pathrefid</td> |
| 28 | <td valign="top">The reference to the path to convert from</td> |
| 29 | <td align="center" valign="top">Yes</td> |
| 30 | </tr> |
| 31 | <tr> |
| 32 | <td valign="top">ignorenonrelative</td> |
| 33 | <td valign="top">This boolean controls what will happen if any of the |
| 34 | files in the path are not in the directory for the fileset. If this |
| 35 | is "true" the files are ignored, if this is "false" a build exception |
| 36 | is thrown. (Note: if files are not present no check is made). |
| 37 | </td> |
| 38 | <td align="center" valign="top">No, default is "false"</td> |
| 39 | </tr> |
| 40 | <tr> |
| 41 | <td valign="top">name</td> |
| 42 | <td valign="top">This is the identifier of the fileset to create. This |
| 43 | fileset will contain the files that are relative to the directory root. |
| 44 | Any files that are not present will not be placed in the set. |
| 45 | </td> |
| 46 | <td align="center" valign="top">Yes</td> |
| 47 | </tr> |
| 48 | </table> |
| 49 | </body> |
| 50 | <h2>Example</h2> |
| 51 | <pre> |
| 52 | <outofdate outputsourcespath="modified.sources.path"> |
| 53 | <sourcefiles> |
| 54 | <fileset dir="a/b/c" includes="**/*.java"/> |
| 55 | </sourcefiles> |
| 56 | <mapper dir="a/b/c" type="glob" from="*.java" to="output/*.xml"/> |
| 57 | <sequential> |
| 58 | <pathtofileset name="modified.sources.fileset" |
| 59 | pathrefid="modified.sources.path" |
| 60 | dir="a/b/c"/> |
| 61 | <copy todir="output"> |
| 62 | <fileset refid="modified.sources.fileset"/> |
| 63 | <mapper type="glob" from="*.java" to="*.xml"/> |
| 64 | </copy> |
| 65 | </sequential> |
| 66 | </outofdate> |
| 67 | </pre> |
| 68 | |
| 69 | <hr> |
| 70 | <p align="center">Copyright © 2003 Ant-Contrib Project. All |
| 71 | rights Reserved.</p> |
| 72 | |
| 73 | </html> |