zen-fs / core

A filesystem, anywhere
https://zen-fs.github.io/core/
MIT License
103 stars 14 forks source link

Clarification on intended behaviour #81

Closed terryluan12 closed 1 week ago

terryluan12 commented 2 months ago

From #78, I discovered that when reading a file, zen-fs always goes through the promises.ts:readFile and subsequently the file.ts:read function.

If you use the Overlay backend, the file.ts:read function calls overlay.ts:sync which calls the _writable backend's syc function. If the backends are not identical however, this will result in a Error: ENOENT: No such file or directory error.

I'm working to fix this, but I'm unsure about the intended behaviour. Could I get some guidance on this?

james-pre commented 2 months ago

@terryluan12, thanks for the question.

The Overlay backend is essentially a copy-on-write system for ZenFS. It keeps track of only the changed and deleted files.

james-pre commented 2 months ago

@terryluan12 Can I close this issue?

terryluan12 commented 1 week ago

Yep, thanks for clarifying!