On Wed, Oct 22, 2014 at 5:22 PM, Mark Volkmann
<r.mark.volkm...@gmail.com> wrote:
> Thanks for explaining that! Doesn't your explanation mean that the
> documentation is wrong? From what you said, "ax" does NOT fail if path
> exists and does NOT ensure that path is newly created.

No, the documentation is correct.  If what you said was true, then
'ax' would be a synonym for 'a'.

'ax' creates and opens the file in append-only mode unless the file
exists.  You use 'ax' when you would use 'wx' but also want
append-only semantics.

A typical use case is where a master process opens the log file with
'ax' and, if successful, starts workers that open the file with 'a'.
The 'ax' open mode ensures that the master can't race with other
master processes.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHQurc-nHFgQ3uXNRm64h88YsAFAvy4Sfhtn_evzk_eNY3mm4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to