title: Flag options of createWriteStream
body: <p>I am using node js to write text file to disk : </p>
  
  <pre><code>const fs = Promise.promisifyAll(require('fs'));
  
  var path = directory + '/cpu.log';
  
  var a = fs.createWriteStream(path, {
              flags: 'a'
          });
  
  a.write('test string');
  </code></pre>
  
  <p>What are the options for <code>flags: 'foo'</code></p>
  
  <p>I could not find the alternatives in <a href="https://nodejs.org/api/fs.html#fs_fs_createwritestream_path_options" rel="nofollow noreferrer">documentation</a>.</p>