0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/fs
Ben Noordhuis 482b56ae60 fs: default open/openSync flags argument to 'r'
Make fs.open() and fs.openSync() more economic to use by making the
flags argument optional. You can now write:

    fs.open(file, cb)

Instead of the more verbose:

    fs.open(file, 'r', cb)

This idiom is already supported by functions like fs.readFile().

PR-URL: https://github.com/nodejs/node/pull/23767
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-26 06:35:21 -07:00
..
promises.js fs: default open/openSync flags argument to 'r' 2018-10-26 06:35:21 -07:00
read_file_context.js
streams.js
sync_write_stream.js
utils.js src,lib: move natives and constants to internalBinding() 2018-10-21 03:17:12 +02:00
watchers.js src: refactor FillStatsArray 2018-10-24 11:52:15 -04:00