What effect does `binary` mode have on file writes?

23 views
Skip to first unread message

Nathan Long

unread,
Sep 12, 2016, 8:41:48 AM9/12/16
to Erlang Questions
I'm looking at the docs for the `file` module: http://erlang.org/doc/man/file.html

Under `open/2`, it says this about `binary` mode: "Read operations on the file return binaries rather than lists."

It mentions no effect on writes to the file.

However, in the docs for `copy/2`, it says:

> If both Source and Destination refer to filenames, the files are opened with [read, binary] and [write, binary] prepended to their mode lists, respectively, to optimize the copy.

This sounds like `binary` does affect writes.

What effect, if any, does `binary` mode have on file writes?
Reply all
Reply to author
Forward
0 new messages