source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/sync.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 2.6 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Sync Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="get">Sync</a></h2>
12<p><em>Since Ant 1.6</em></p>
13<h3>Description</h3>
14
15<p>Synchronize a target directory from the files defined in one or
16more filesets.</p>
17
18<p>Any file in the target directory that has not been matched by at
19least one of the nested filesets gets removed. I.e. if you exclude a
20file in your sources and a file of that name is present in the target
21dir, it will get removed from the target.</p>
22
23<h3>Parameters</h3>
24<table border="1" cellpadding="2" cellspacing="0">
25 <tr>
26 <td valign="top"><b>Attribute</b></td>
27 <td valign="top"><b>Description</b></td>
28 <td align="center" valign="top"><b>Required</b></td>
29 </tr>
30 <tr>
31 <td valign="top">todir</td>
32 <td valign="top">the target directory to sync with the filesets</td>
33 <td align="center" valign="top">Yes</td>
34 </tr>
35 <tr>
36 <td valign="top">overwrite</td>
37 <td valign="top">Overwrite existing files even if the destination
38 files are newer.</td>
39 <td valign="top" align="center">No; defaults to false.</td>
40 </tr>
41 <tr>
42 <td valign="top">includeEmptyDirs</td>
43 <td valign="top">Copy any empty directories included in the FileSet(s).
44 </td>
45 <td valign="top" align="center">No; defaults to true.</td>
46 </tr>
47 <tr>
48 <td valign="top">failonerror</td>
49 <td valign="top">Log a warning message, but do not stop the build,
50 when one of the nested filesets points to a directory that
51 doesn't exist.
52 </td>
53 <td valign="top" align="center">No; defaults to true.</td>
54 </tr>
55 <tr>
56 <td valign="top">verbose</td>
57 <td valign="top">Log the files that are being copied.</td>
58 <td valign="top" align="center">No; defaults to false.</td>
59 </tr>
60 <tr>
61 <td valign="top">granularity</td>
62 <td valign="top">The number of milliseconds leeway to give before
63 deciding a file is out of date. This is needed because not every
64 file system supports tracking the last modified time to the
65 millisecond level. Default is 0 milliseconds, or 2 seconds on DOS
66 systems. This can also be useful if source and target files live
67 on separate machines with clocks being out of sync. <em>since Ant
68 1.6.2</em>.</td>
69 </tr>
70</table>
71
72<h3>Parameters specified as nested elements</h3>
73
74<h4>fileset</h4>
75<p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select
76sets of files and directories.</p>
77
78<hr>
79<p align="center">Copyright &copy; 2003-2005 The Apache Software Foundation. All rights
80Reserved.</p>
81
82</body>
83</html>
84
Note: See TracBrowser for help on using the repository browser.