<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Greetings,<br class=""><br class="">file:open/2 documentation has this to say about Modes. Does it cover what you want to do?<br class=""><div><br class=""><dt style="caret-color: rgb(26, 26, 26); color: rgb(26, 26, 26); font-family: sans-serif; font-size: 16px;" class=""><strong class=""><span class="code" style="font-family: mono, Courier, monospace; font-weight: normal; background-color: rgb(243, 243, 243);">write</span></strong></dt><dd style="caret-color: rgb(26, 26, 26); color: rgb(26, 26, 26); font-family: sans-serif; font-size: 16px;" class=""><p style="max-width: 42em;" class="">The file is opened for writing. It is created if it does not exist. If the file exists and <span class="code" style="font-family: mono, Courier, monospace; background-color: rgb(243, 243, 243);">write</span> is not combined with <span class="code" style="font-family: mono, Courier, monospace; background-color: rgb(243, 243, 243);">read</span>, the file is truncated.</p></dd><blockquote type="cite" class=""><div class="">On 1 Oct 2018, at 05:24, Krishna Sai Veera Reddy <<a href="mailto:veerareddy@email.arizona.edu" class="">veerareddy@email.arizona.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Is it possible to open files in O_TRUNC mode in erlang using the `file` module? If not, is this something we want added to the standard library?<div class=""><br class=""></div><div class="">Thanks,</div><div class="">Krishna</div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>