| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <title>Sync Task</title> |
| <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css"> |
| </head> |
| |
| <body> |
| |
| <h2><a name="get">Sync</a></h2> |
| <p><em>Since Ant 1.6</em></p> |
| <h3>Description</h3> |
| |
| <p>Synchronize a target directory from the files defined in one or |
| more filesets.</p> |
| |
| <p>Any file in the target directory that has not been matched by at |
| least one of the nested filesets gets removed. I.e. if you exclude a |
| file in your sources and a file of that name is present in the target |
| dir, it will get removed from the target.</p> |
| |
| <h3>Parameters</h3> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td valign="top"><b>Attribute</b></td> |
| <td valign="top"><b>Description</b></td> |
| <td align="center" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">todir</td> |
| <td valign="top">the target directory to sync with the filesets</td> |
| <td align="center" valign="top">Yes</td> |
| </tr> |
| <tr> |
| <td valign="top">overwrite</td> |
| <td valign="top">Overwrite existing files even if the destination |
| files are newer.</td> |
| <td valign="top" align="center">No; defaults to false.</td> |
| </tr> |
| <tr> |
| <td valign="top">includeEmptyDirs</td> |
| <td valign="top">Copy any empty directories included in the FileSet(s). |
| </td> |
| <td valign="top" align="center">No; defaults to true.</td> |
| </tr> |
| <tr> |
| <td valign="top">failonerror</td> |
| <td valign="top">Log a warning message, but do not stop the build, |
| when one of the nested filesets points to a directory that |
| doesn't exist. |
| </td> |
| <td valign="top" align="center">No; defaults to true.</td> |
| </tr> |
| <tr> |
| <td valign="top">verbose</td> |
| <td valign="top">Log the files that are being copied.</td> |
| <td valign="top" align="center">No; defaults to false.</td> |
| </tr> |
| <tr> |
| <td valign="top">granularity</td> |
| <td valign="top">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, or 2 seconds on DOS |
| systems. This can also be useful if source and target files live |
| on separate machines with clocks being out of sync. <em>since Ant |
| 1.6.2</em>.</td> |
| </tr> |
| </table> |
| |
| <h3>Parameters specified as nested elements</h3> |
| |
| <h4>fileset</h4> |
| <p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select |
| sets of files and directories.</p> |
| |
| <hr> |
| <p align="center">Copyright © 2003-2005 The Apache Software Foundation. All rights |
| Reserved.</p> |
| |
| </body> |
| </html> |
| |