2002-11-07 16:26:18 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-03-07 18:11:14 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/>
|
2002-11-07 16:26:18 +00:00
|
|
|
<title>Ant User Manual</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h2><a name="attrib">Attrib</a></h2>
|
2003-05-21 08:55:35 +00:00
|
|
|
<p><em>Since Ant 1.6.</em></p>
|
2002-11-07 16:26:18 +00:00
|
|
|
<h3>Description</h3>
|
|
|
|
|
|
|
|
<p>Changes the attributes of a file or all files inside specified
|
|
|
|
directories. Right now it has effect only under Windows. Each of the
|
|
|
|
4 possible permissions has its own attribute, matching the arguments
|
|
|
|
for the attrib command.</p>
|
|
|
|
|
2003-06-24 09:16:10 +00:00
|
|
|
<p><a href="../CoreTypes/fileset.html">FileSet</a>s,
|
|
|
|
<a href="../CoreTypes/dirset.html">DirSet</a>s or <a
|
2003-05-21 08:55:35 +00:00
|
|
|
href="../CoreTypes/filelist.html">FileList</a>s can be specified using
|
2003-06-24 09:16:10 +00:00
|
|
|
nested <code><fileset></code>, <code><dirset></code> and
|
|
|
|
<code><filelist></code> elements.</p>
|
2002-11-07 16:26:18 +00:00
|
|
|
|
|
|
|
<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">file</td>
|
2002-11-08 08:32:13 +00:00
|
|
|
<td valign="top">the file or directory of which the permissions must be
|
2002-11-07 16:26:18 +00:00
|
|
|
changed.</td>
|
2002-11-08 08:32:13 +00:00
|
|
|
<td valign="top" valign="middle">Yes or nested
|
2003-05-21 08:55:35 +00:00
|
|
|
<code><fileset/list></code> elements.</td>
|
2002-11-07 16:26:18 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">readonly</td>
|
|
|
|
<td valign="top">the readonly permission.</td>
|
|
|
|
<td valign="top" rowspan="4">at least one of the four. </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">archive</td>
|
|
|
|
<td valign="top">the archive permission.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">system</td>
|
|
|
|
<td valign="top">the system permission.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">hidden</td>
|
|
|
|
<td valign="top">the hidden permission.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">type</td>
|
|
|
|
<td valign="top">One of <i>file</i>, <i>dir</i> or <i>both</i>. If set to
|
|
|
|
<i>file</i>, only the permissions of plain files are going to be changed.
|
2003-06-24 09:16:10 +00:00
|
|
|
If set to <i>dir</i>, only the directories are considered.<br>
|
|
|
|
<strong>Note:</strong> The type attribute does not apply to
|
|
|
|
nested <i>dirset</i>s - <i>dirset</i>s always implicitly
|
|
|
|
assume type to be <i>dir</i>.</td>
|
2002-11-07 16:26:18 +00:00
|
|
|
<td align="center" valign="top">No, default is <i>file</i></td>
|
|
|
|
</tr>
|
2003-05-21 08:55:35 +00:00
|
|
|
<tr>
|
|
|
|
<td valign="top">verbose</td>
|
|
|
|
<td valign="top">Whether to print a summary after execution or not.
|
|
|
|
Defaults to <code>false</code>.</td>
|
|
|
|
<td align="center" valign="top">No</td>
|
|
|
|
</tr>
|
2002-11-07 16:26:18 +00:00
|
|
|
</table>
|
|
|
|
<h3>Examples</h3>
|
|
|
|
<blockquote>
|
|
|
|
<p><code><attrib file="${dist}/run.bat" readonly="true" hidden="true"/></code></p>
|
|
|
|
</blockquote>
|
|
|
|
<p>makes the "run.bat" file read-only and hidden.</p>
|
|
|
|
<blockquote>
|
|
|
|
<pre><attrib readonly="false">
|
|
|
|
<fileset dir="${meta.inf}" includes="**/*.xml"/>
|
|
|
|
<attrib>
|
|
|
|
</pre>
|
|
|
|
</blockquote>
|
|
|
|
<p>makes all ".xml" files below <code>${meta.inf}</code> readable.</p>
|
|
|
|
<blockquote>
|
|
|
|
<pre>
|
|
|
|
<attrib readonly="true" archive="true">
|
|
|
|
<fileset dir="shared/sources1">
|
|
|
|
<exclude name="**/trial/**"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset refid="other.shared.sources"/>
|
|
|
|
</attrib>
|
|
|
|
</pre>
|
|
|
|
</blockquote>
|
|
|
|
<p>makes all files below <code>shared/sources1</code> (except those below any
|
|
|
|
directory named trial) read-only and archived. In addition all files belonging
|
|
|
|
to a FileSet with <code>id</code> <code>other.shared.sources</code> get the
|
|
|
|
same attributes.</p>
|
|
|
|
<hr>
|
2005-03-07 18:11:14 +00:00
|
|
|
<p align="center">Copyright © 2002-2003,2005 Apache Software
|
2002-11-07 16:26:18 +00:00
|
|
|
Foundation. All rights Reserved.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|