Unsorted Filenames

Hello!

First, thank you for your package. I am a Node.js beginner and memfs helps me a lot with testing and mocking.

I am developing a package to load configuration alphabetically by filenames. Searching for Node.js fs readdir behavior, I just realize this method is always sorted on Linux, but not on Windows (or filesystems, whatever).

https://github.com/nodejs/node/issues/3232

https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback http://man7.org/linux/man-pages/man3/readdir.3.html#NOTES

Thinking about it, currently, I can't simulate a readdir with unsorted filenames in memfs.

https://github.com/streamich/memfs/blob/master/src/volume.ts#L1486

Can we improve some configuration to disable that feature, or implement another sort?

该提问来源于开源项目:streamich/memfs

查看全部
weixin_39830323
weixin_39830323
2020/11/21 23:47
  • 点赞
  • 收藏
  • 回答
    私信

4个回复