I am using node js to write text file to disk :
const fs = Promise.promisifyAll(require('fs'));
var path = directory + '/cpu.log';
var a = fs.createWriteStream(path, {
flags: 'a'
});
a.write('test string');
What are the options for flags: 'foo'
I could not find the alternatives in documentation.