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

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

initial import of LiRK3

File size: 1.6 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Dirname Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="echo">Dirname</a></h2>
12<h3>Description</h3>
13<p>
14Task to determine the directory path of a specified file.
15</p>
16<p>
17When this task executes, it will set the specified property to the
18value of the specified file up to, but not including, the last path
19element. If the specified file is a path that ends in a filename,
20the filename will be dropped. If the specified file is just a filename,
21the directory will be the current directory.
22</p>
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">file</td>
32 <td valign="top">The path to take the dirname of.</td>
33 <td valign="top" align="center">Yes</td>
34 </tr>
35 <tr>
36 <td valign="top">property</td>
37 <td valign="top">The name of the property to set.</td>
38 <td valign="top" align="center">Yes</td>
39 </tr>
40</table>
41
42<h3>Examples</h3>
43<pre> &lt;dirname property=&quot;antfile.dir&quot; file=&quot;${ant.file}&quot;/&gt;</pre>
44will set <code>antfile.dir</code> to the directory path for
45<code>${ant.file}</code>.
46<pre> &lt;dirname property=&quot;foo.dirname&quot; file=&quot;foo.txt&quot;/&gt;</pre>
47will set <code>foo.dirname</code> to the project's basedir.</p>
48
49<hr>
50<p align="center">Copyright &copy; 2002,2004 The Apache Software Foundation.
51All rights Reserved.</p>
52
53</body>
54</html>
55
Note: See TracBrowser for help on using the repository browser.