Load a text file into a single property.
For a list of all members of this type, see LoadFileTask Members.
System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.LoadFileTask
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Unless an encoding is specified, the encoding associated with the system's current ANSI code page is used.
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.
Load file message.txt
into property "message".
<loadfile file="message.txt" property="message" />
Load a file using the "latin-1" encoding.
<loadfile file="loadfile.xml" property="encoded-file" encoding="iso-8859-1" />
Load a file, replacing all @NOW@
tokens with the current date/time.
<loadfile file="token.txt" property="token-file"> <filterchain> <replacetokens> <token key="NOW" value="${datetime::now()}" /> </replacetokens> </filterchain> </loadfile>
Namespace: NAnt.Core.Tasks
Assembly: NAnt.Core (in NAnt.Core.dll)
LoadFileTask Members | NAnt.Core.Tasks Namespace