1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<!-- Documenting T:NAnt.Core.Tasks.LoadFileTask-->
5
<meta http-equiv="Content-Language" content="en-ca" />
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
<link rel="stylesheet" type="text/css" href="../style.css" />
8
<title><loadfile> Task</title>
11
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar">
13
<td class="NavBar-Cell">
14
<a href="http://nant.sourceforge.net">
17
<img alt="->" src="../images/arrow.gif" />
18
<a href="../index.html">Help</a>
19
<img alt="->" src="../images/arrow.gif" />
20
<a href="../tasks/index.html">Task Reference</a>
21
<img alt="->" src="../images/arrow.gif" /> <loadfile></td>
22
<td class="NavBar-Cell" align="right">
26
<h1><loadfile></h1>
27
<p> Load a text file into a single property. </p>
28
<p> Unless an encoding is specified, the encoding associated with the system's current ANSI code page is used. </p>
29
<p> An UTF-8, little-endian Unicode, and big-endian Unicode encoded text file is automatically recognized, if the file starts with the appropriate byte order marks. </p>
35
<th style="text-align: center;">Type</th>
37
<th style="text-align: center;">Required</th>
40
<td valign="top" class="required">file</td>
41
<td style="text-align: center;">file</td>
42
<td> The file to load. </td>
43
<td style="text-align: center;">True</td>
46
<td valign="top" class="required">property</td>
47
<td style="text-align: center;">string</td>
48
<td> The name of the property to save the content to. </td>
49
<td style="text-align: center;">True</td>
52
<td valign="top">encoding</td>
53
<td style="text-align: center;">
54
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemTextEncodingClassTopic.asp">Encoding</a>
56
<td> The encoding to use when loading the file. The default is the encoding associated with the system's current ANSI code page. </td>
57
<td style="text-align: center;">False</td>
60
<td valign="top">failonerror</td>
61
<td style="text-align: center;">bool</td>
62
<td> Determines if task failure stops the build, or is just reported. The default is <b>true</b>. </td>
63
<td style="text-align: center;">False</td>
66
<td valign="top">if</td>
67
<td style="text-align: center;">bool</td>
68
<td> If <b>true</b> then the task will be executed; otherwise, skipped. The default is <b>true</b>. </td>
69
<td style="text-align: center;">False</td>
72
<td valign="top">unless</td>
73
<td style="text-align: center;">bool</td>
74
<td> Opposite of <code>if</code>. If <b>false</b> then the task will be executed; otherwise, skipped. The default is <b>false</b>. </td>
75
<td style="text-align: center;">False</td>
78
<td valign="top">verbose</td>
79
<td style="text-align: center;">bool</td>
80
<td> Determines whether the task should report detailed build log messages. The default is <b>false</b>. </td>
81
<td style="text-align: center;">False</td>
85
<h3>Nested Elements:</h3>
90
<<a href="../types/filterchain.html">filterchain</a>>
92
<div class="nested-element"> The filterchain definition to use. <p /></div>
96
</<a href="../types/filterchain.html">filterchain</a>>
101
<p> Load file <code>message.txt</code> into property "message". </p>
105
property="message" />
109
<p> Load a file using the "latin-1" encoding. </p>
113
property="encoded-file"
114
encoding="iso-8859-1" />
118
<p> Load a file, replacing all <code>@NOW@</code> tokens with the current date/time. </p>
120
<loadfile file="token.txt" property="token-file">
122
<replacetokens>
123
<token key="NOW" value="${datetime::now()}" />
124
</replacetokens>
130
<h3>Requirements</h3>
131
<div style="margin-left: 20px;">
132
<b>Assembly:</b> NAnt.Core (0.90.3780.0)
b'\\ No newline at end of file'