<div dir="ltr">write_file/3 lists <i>Binary</i> as the second argument, but <i>Modes</i> in the description (no mention of <i>Binary</i>).<br><br>From the documentation:<br clear="all"><p style="font-family: trebuchet ms,sans-serif;">
<a name="write_file-3"><span class="bold_code">write_file(Filename, <b>Binary</b>, Bytes) -> ok | {error, Reason}</span></a><br>

</p>

<div style="font-family: trebuchet ms,sans-serif;" class="REFBODY"><p>Types:</p>
  <div class="REFTYPES">
<p>
<span class="bold_code">Filename = name()</span><br>
<span class="bold_code">Bytes = iodata()</span><br>
<b><span class="bold_code">Modes = [Mode] -- see open/2</span></b><br>
<span class="bold_code">Reason = ext_posix() | terminated | system_limit</span><br>

 </p> </div>
</div>

<div style="font-family: trebuchet ms,sans-serif;" class="REFBODY">

<p>Same as <span class="code">write_file/2</span>, but takes a third argument
<span class="code">Modes</span>, a list of possible modes, see
<a href="file:///usr/local/lib/erlang/lib/kernel-2.12.3/doc/html/file.html#open-2">open/2</a>. The mode flags
<span class="code">binary</span> and <span class="code">write</span> are implicit, so they should
not be used.
</p>
</div><br>-- <br>For every expert there is an equal and opposite expert - Arthur C. Clarke<br>
</div>