jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.06k stars 215 forks source link

Options #206

Closed linnando closed 1 year ago

linnando commented 6 years ago

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.

jvilk commented 6 years ago

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.

emeryberger commented 1 year ago

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.

linnando commented 1 year ago

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.