Closed korakot closed 5 years ago
We provide convenience functions for Data.init
and String.init
why are these not sufficient?
At first, I didn't see it in the examples.
They should be good enough. But I still prefer read_text()
where you can chain the methods in logical order (you go into a directory, reach a file, then read its text.)
We offer chaining for file system operations, and extensions for Apple API that takes string paths for the rest. I'd be convinced by a good example though.
Python's pathlib has them since version 3.5 It will make reading text much easier.