File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,16 @@ const O_CREAT = fs.constants.O_CREAT || 0;
1010const O_EXCL = fs . constants . O_EXCL || 0 ;
1111const O_RDONLY = fs . constants . O_RDONLY || 0 ;
1212const O_RDWR = fs . constants . O_RDWR || 0 ;
13+ const O_SYNC = fs . constants . O_SYNC || 0 ;
1314const O_TRUNC = fs . constants . O_TRUNC || 0 ;
1415const O_WRONLY = fs . constants . O_WRONLY || 0 ;
1516
1617const { stringToFlags } = require ( 'internal/fs' ) ;
1718
1819assert . strictEqual ( stringToFlags ( 'r' ) , O_RDONLY ) ;
1920assert . strictEqual ( stringToFlags ( 'r+' ) , O_RDWR ) ;
21+ assert . strictEqual ( stringToFlags ( 'rs+' ) , O_RDWR | O_SYNC ) ;
22+ assert . strictEqual ( stringToFlags ( 'sr+' ) , O_RDWR | O_SYNC ) ;
2023assert . strictEqual ( stringToFlags ( 'w' ) , O_TRUNC | O_CREAT | O_WRONLY ) ;
2124assert . strictEqual ( stringToFlags ( 'w+' ) , O_TRUNC | O_CREAT | O_RDWR ) ;
2225assert . strictEqual ( stringToFlags ( 'a' ) , O_APPEND | O_CREAT | O_WRONLY ) ;
You can’t perform that action at this time.
0 commit comments