Apache Ant LoadFile Task
This task is used to load file into a property. It works on files and provides a srcFile attribute for ease. It uses default encoding current locale unless other one is specified.
It uses various attributes which are given below.
Apache Ant LoadFile Task Attributes
Lets have some examples to understand it's functionalities.
Apache Ant LoadFile Task Example
The above code will produce the content of abc.txt file.
Specifying encoding while reading file.
Set failonerror to get error information