## LoadFile

### Description

Load a text file into a single property. Unless an encoding is specified, the encoding of the current locale is used. There is no explicit limit upon the size of the file which can be loaded, but loading very large files is not something anyone has yet explored.

### Parameters

Attribute | Description | Required
srcFile | source file | Yes
property | property to save to | Yes
encoding | encoding to use when loading the file | No
failonerror | Whether to halt the build on failure | No, default "true"

### Examples

        <loadfile property="mail.recipients"
          srcFile="recipients.txt" / >

Load file recipients.txt into property "mail.recipients"

        <loadfile property="encoded-file"
          srcFile="loadfile.xml"
          encoding="ISO-8859-1" / >

Load a file using the latin-1 encoding

        <loadfile
          property="optional.value"
          srcFile="optional.txt"
          failonerror="false" />

Load a file, don't fail if it is missing (a message is printed, though)

Copyright © 2001 Apache Software Foundation. All rights Reserved.