LegacyFile
You have:
Files separated by CR (carriage return_), LF (line feed), or CRLF?
You want:
To read them all in and expose a stream of lines regardless.
Wait! Doesn't Elixir / Erlang support this out of the box?
No. File.Stream uses IO.each__stream which uses :io.get_line. LF and CRLF are handled, but not CR, which is used in some Mac OS and other legacy formats.
Installation
If available in Hex, the package can be installed
by adding legacy_file
to your list of dependencies in mix.exs
:
def deps do
[{:legacy_file, "~> 0.1.0"}]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/legacy_file.