#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
newlineargument. - Default of
newlineisplatform, for backward compatibility. - Allows
preservefor writingtextto write rawtext. - Allows custom specific new lines to be used as well.
- No
preservewhen writinglinesas then may be get mixed new lines.
- Added new optional
- Extended ToolDef documentation for the
readlines/writefiletools.
Closes #571 (closed)
Edited by Dennis Hendriks