BrowserFS icon indicating copy to clipboard operation
BrowserFS copied to clipboard

Options

Open linnando opened this issue 7 years ago • 1 comments

Hi!

I've added a couple of small changes for better compatibility with Node.js fs module:

  1. Passing null as an options argument makes a file operation use the default options (currently, it causes a null dereference exception).
  2. 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.

linnando avatar Dec 31 '17 14:12 linnando

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.

jvilk avatar Jan 04 '18 18:01 jvilk

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.

emeryberger avatar Feb 18 '23 19:02 emeryberger

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.

linnando avatar Feb 19 '23 08:02 linnando