Va Da
Va Da
@vjpr has [suggested that this advanced export/import functionality could even be a separate module](https://github.com/streamich/memfs/issues/48#issuecomment-340404484), so it can be used with real `fs`, as well as with `memfs`. - https://github.com/streamich/memfs/issues/48#issuecomment-340409439
https://github.com/streamich/memfs/blob/master/demo/JSON.ts
> 1. there would be an option to configure it Yes, it seems we could add support for case insensitive paths. > 2. the default behavior would be to use...
@piotr-oles PR from you :)
If in step 5 you rename `fx` to `fs`, does it work? This works for me ```js var fs = require("memfs") fs.mkdirSync('/dir'); fs.writeFileSync('/dir/file.ext', 'asdf'); fs.readFileSync('/dir/file.ext'); fs.renameSync('/dir/file.ext', '/dir/newfile.ext'); console.log(fs.readFileSync('/dir/newfile.ext', 'utf8')); ```
Have considered GraphQL? I'm not sure how this is related to `memfs`, you can just have a HTTP endpoint that serves your state (different per user, based on authentication).
It must be this line: - https://github.com/streamich/memfs/blob/master/src/volume.ts#L2180 - https://github.com/streamich/memfs/blob/master/src/volume.ts#L392 And the current implementation in Node is like this: - https://github.com/nodejs/node/blob/master/lib/internal/fs/streams.js#L55 - https://github.com/nodejs/node/blob/master/lib/internal/url.js#L1365 - https://github.com/nodejs/node/blob/master/lib/internal/url.js#L1331
Could you await until the request completes in your test? So when `vol.reset()` is called the file is already closed.
Another approach could be to not use `vol.reset()` but in each test create its own volume. ```js test('...', async () => { const vol = new Volume(); // ... });...
Please see: https://github.com/streamich/memfs/pull/101 I think I fixed it with this line: https://github.com/streamich/memfs/pull/101/commits/0cf18dd3784f7079a8647d930edb5cf512bbcf21#diff-237b96688267edc5b8448d6322f36d8dL1477