There was an error while loading. Please reload this page.
1 parent 5156342 commit bc65182Copy full SHA for bc65182
lib/internal/fs.js
@@ -223,10 +223,14 @@ function stringToFlags(flags) {
223
case 'a' : return O_APPEND | O_CREAT | O_WRONLY;
224
case 'ax' : // Fall through.
225
case 'xa' : return O_APPEND | O_CREAT | O_WRONLY | O_EXCL;
226
+ case 'as' : // Fall through.
227
+ case 'sa' : return O_APPEND | O_CREAT | O_WRONLY | O_SYNC;
228
229
case 'a+' : return O_APPEND | O_CREAT | O_RDWR;
230
case 'ax+': // Fall through.
231
case 'xa+': return O_APPEND | O_CREAT | O_RDWR | O_EXCL;
232
+ case 'as+': // Fall through.
233
+ case 'sa+': return O_APPEND | O_CREAT | O_RDWR | O_SYNC;
234
}
235
236
throw new errors.TypeError('ERR_INVALID_OPT_VALUE', 'flags', flags);
0 commit comments