You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UnliftIO.IO.File currently offers only binary mode file operations.
It would be nice if text mode operations were offered too, to simplify writing text files in a cross-platform way: On Windows, text mode writes change LF line endings to CRLF. See openBinaryFile:
On Windows, reading a file in text mode (which is the default) will translate CRLF to LF, and writing will translate LF to CRLF. This is usually what you want with text files. With binary files this is undesirable; also, as usual under Microsoft operating systems, text mode treats control-Z as EOF. Binary mode turns off all special treatment of end-of-line and end-of-file characters. (See also hSetBinaryMode.)
The text was updated successfully, but these errors were encountered:
Yes, that would be my recommended approach. I don't have a strong opinion, but I'm weakly against adding more helper functions to the API due to expanding things too much.
UnliftIO.IO.File
currently offers only binary mode file operations.It would be nice if text mode operations were offered too, to simplify writing text files in a cross-platform way: On Windows, text mode writes change
LF
line endings toCRLF
. SeeopenBinaryFile
:The text was updated successfully, but these errors were encountered: