InFilePath | Where to find the file. |
ListVarName | Name of the list variable to populate. Optional. If variable does not already exist then one will be created. |
The lines in the list will not have newlines at the end.
Passing a list variable name is optional. Either way, the command will return a list value.
Note this assumes UTF-8 encoding. Support for flags should come in a future release.
% set MyList {{Element 1} {Element 2} {Element 3}}
{Element 1} {Element 2} {Element 3}
% List2File $MyList test.txt
% File2List test.txt MyList2
{Element 1} {Element 2} {Element 3}
% puts $MyList2
{Element 1} {Element 2} {Element 3}