Skip to content

fs: remove options.encoding from Dir.read*()

I had implemented it 'just in case' but in https://github.com/nodejs/node/pull/29893 it occurs to me that this is likely not a good idea and this functionality should not be released if possible.

This is unlikely to be necessary in any case, and causes much unwarranted complexity when implementing further optimizations.

i.e. if you really need multiple encodings, you're probably better off reading the whole thing more than once. Or, if someone really does come along with an actual compelling use case then we can reconsider.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading