source: release-kits/lirk3/bin/ant-installer/web/manual1.6.2/manual/OptionalTasks/attrib.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 3.6 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Ant User Manual</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="attrib">Attrib</a></h2>
12<p><em>Since Ant 1.6.</em></p>
13<h3>Description</h3>
14
15<p>Changes the attributes of a file or all files inside specified
16directories. Right now it has effect only under Windows. Each of the
174 possible permissions has its own attribute, matching the arguments
18for the attrib command.</p>
19
20<p><a href="../CoreTypes/fileset.html">FileSet</a>s,
21<a href="../CoreTypes/dirset.html">DirSet</a>s or <a
22href="../CoreTypes/filelist.html">FileList</a>s can be specified using
23nested <code>&lt;fileset&gt;</code>, <code>&lt;dirset&gt;</code> and
24<code>&lt;filelist&gt;</code> elements.</p>
25
26<h3>Parameters</h3>
27<table border="1" cellpadding="2" cellspacing="0">
28 <tr>
29 <td valign="top"><b>Attribute</b></td>
30 <td valign="top"><b>Description</b></td>
31 <td align="center" valign="top"><b>Required</b></td>
32 </tr>
33 <tr>
34 <td valign="top">file</td>
35 <td valign="top">the file or directory of which the permissions must be
36 changed.</td>
37 <td valign="top" valign="middle">Yes or nested
38 <code>&lt;fileset/list&gt;</code> elements.</td>
39 </tr>
40 <tr>
41 <td valign="top">readonly</td>
42 <td valign="top">the readonly permission.</td>
43 <td valign="top" rowspan="4">at least one of the four. </td>
44 </tr>
45 <tr>
46 <td valign="top">archive</td>
47 <td valign="top">the archive permission.</td>
48 </tr>
49 <tr>
50 <td valign="top">system</td>
51 <td valign="top">the system permission.</td>
52 </tr>
53 <tr>
54 <td valign="top">hidden</td>
55 <td valign="top">the hidden permission.</td>
56 </tr>
57 <tr>
58 <td valign="top">type</td>
59 <td valign="top">One of <i>file</i>, <i>dir</i> or <i>both</i>. If set to
60 <i>file</i>, only the permissions of plain files are going to be changed.
61 If set to <i>dir</i>, only the directories are considered.<br>
62 <strong>Note:</strong> The type attribute does not apply to
63 nested <i>dirset</i>s - <i>dirset</i>s always implicitly
64 assume type to be <i>dir</i>.</td>
65 <td align="center" valign="top">No, default is <i>file</i></td>
66 </tr>
67 <tr>
68 <td valign="top">verbose</td>
69 <td valign="top">Whether to print a summary after execution or not.
70 Defaults to <code>false</code>.</td>
71 <td align="center" valign="top">No</td>
72 </tr>
73</table>
74<h3>Examples</h3>
75<blockquote>
76 <p><code>&lt;attrib file=&quot;${dist}/run.bat&quot; readonly=&quot;true&quot; hidden=&quot;true&quot;/&gt;</code></p>
77</blockquote>
78<p>makes the &quot;run.bat&quot; file read-only and hidden.</p>
79<blockquote>
80 <pre>&lt;attrib readonly=&quot;false&quot;&gt;
81 &lt;fileset dir=&quot;${meta.inf}&quot; includes=&quot;**/*.xml&quot;/&gt;
82&lt;attrib&gt;
83</pre>
84</blockquote>
85<p>makes all &quot;.xml&quot; files below <code>${meta.inf}</code> readable.</p>
86<blockquote>
87 <pre>
88&lt;attrib readonly=&quot;true&quot; archive=&quot;true&quot;&gt;
89 &lt;fileset dir=&quot;shared/sources1&quot;&gt;
90 &lt;exclude name=&quot;**/trial/**&quot;/&gt;
91 &lt;/fileset&gt;
92 &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
93&lt;/attrib&gt;
94</pre>
95</blockquote>
96<p>makes all files below <code>shared/sources1</code> (except those below any
97 directory named trial) read-only and archived. In addition all files belonging
98 to a FileSet with <code>id</code> <code>other.shared.sources</code> get the
99 same attributes.</p>
100<hr>
101<p align="center">Copyright &copy; 2002-2004 The Apache Software
102Foundation. All rights Reserved.</p>
103
104</body>
105</html>
106
Note: See TracBrowser for help on using the repository browser.