Skip to content

#571 ToolDef readlines/writefile improvements

  • readlines/writefile: use try-with-resources.
  • readlines: use UTF-8 encoding, to match writefile. 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 is platform, for backward compatibility.
    • Allows preserve for writing text to write raw text.
    • Allows custom specific new lines to be used as well.
    • No preserve when writing lines as then may be get mixed new lines.
  • Extended ToolDef documentation for the readlines/writefile tools.

Closes #571 (closed)

Edited by Dennis Hendriks

Merge request reports