You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No there isn't a way. I'm not sure that I'd like to support this. As then to keep consistency, I'd need to add {append: true} to other file write methods. You can accomplish what you want by creating the file and then appending where you need...
varfs=require('fs-extra');varfile='/some/file/data.txt';vardata=// some datafs.outputFile(file,data,function(err){//creates directory structure if doesn't existif(err)returnconsole.error(err);/*** modify data ***/fs.appendFile(file,data,callback);});
I'm going to leave this open to think about it as v0.9 is going to have some changes.
Is there a way to support this functionality? say { append : true }
fs.outputFile(file, "hello!", function(err) {
}, { append : true });
The text was updated successfully, but these errors were encountered: