#571 ToolDef readlines/writefile improvements
-
readlines
/writefile
: use try-with-resources. -
readlines
: use UTF-8 encoding, to matchwritefile
. Also, we always use UTF-8, rather than the default (platform) encoding, and especially ToolDef should be platform-independent. -
writefile
: different way of handling new lines.- Added new optional
newline
argument. - Default of
newline
isplatform
, for backward compatibility. - Allows
preserve
for writingtext
to write rawtext
. - Allows custom specific new lines to be used as well.
- No
preserve
when writinglines
as then may be get mixed new lines.
- Added new optional
- Extended ToolDef documentation for the
readlines
/writefile
tools.
Closes #571 (closed)
Edited by Dennis Hendriks