file_to_buffer
Function Syntax
buffer file_to_buffer( string filepath )
- Loads the entire contents of a text file into a buffer.
- filepath: Path to the text file
This does not ignore empty lines, or lines starting with #
.
This function was added in r19439.
Code Samples
Load the contents of a text file.
buffer data = file_to_buffer("mydata.txt");
print(`Number of characters in mydata.txt: {data.length()}`);