BrowserFS
BrowserFS copied to clipboard
Options
Hi!
I've added a couple of small changes for better compatibility with Node.js fs module:
- Passing null as an options argument makes a file operation use the default options (currently, it causes a null dereference exception).
- readdir and readdirSync support the options argument according to the Node.js API specification (currently, this argument is not supported and causes a failure if it is passed).
For simplicity, I made the second change in the FS object, whereas similar processing for readFile etc. is performed in particular file systems.
I would be glad to see these changes in the upstream version.
I haven't reviewed the recent changes in the fs
/path
modules; if I accept this pull request, I should also update those modules to be in-line with upstream. Otherwise, BrowserFS will implement some in-between version of the modules.
It may take me some time before I am able to make those changes.
Been a long time, will need some work to handle conflicts and do the work that John mentions above (that he no longer has the cycles to do). Let me know if I should close. Thanks.
I do not mind closing if it is easier for you. I do not use BrowserFS anymore, so I do not care much about this specific feature. And I understand that the branches have diverged significantly in 6 years, so merging them would probably be a harder work than updating BrowserFS in the regular process.