-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BrowserFS → ZenFS #113
Comments
I was already experimenting with ZenFS in a separate project since I was running some issues: eg IOS crashing the page when trying to load big files (~400 MB zips). Also need to update internal patching so I can track all read / write operations, redirect or disable them as needed.
Yes, of course! |
I plan on adding some event system to the ZenFS internals as part of the FS watch features, though it wouldn't allow for changing the operations. If you want to change operations it may be better to write a class that extends |
Thanks, will try it, though I also plan to use remote HTTP and WebAccess backends (already using the last one for writing files back to the user's selected folder). |
Sorry, the suggestion to migrate to newer versions is great, but I've just realized I'll not have any time to work on it :( |
Hey, sorry, just wanted to keep you updated. Unfortunately, the old BrowserFS works just too well to remove it / migrate from it (well, maybe until zen-fs/archives#3 is fixed :). I still want to have a clear codebase that uses updated / modern libs (that's why I had to remember your issue). The app is currently using 6 various backends ( However, I might prioritize this issue if you come up with a more powerful API for taking full control over all operations! |
Thanks for the update. Adding events and the FS watch features is currently my top priority, though I've been busy with classes IRL. I'll see if I can make some time this week and get this done. Sorry for taking so long. |
Hey, @james-pre how are doing, still have a hope you work on the project 🙌 |
@zardoy, it's all implemented, though events and watch features are handled entirely in the emulation layer. 1.0 has been out for almost a whole month now, and a ton of features have been added. |
That's all is very interesting, though as I said earlier I don't need events, but interceptors (like spy-fs) so I can extend the functionality of fs. Also looking forward to ZipFS update! |
Actually, if my project used ZenFS, I think it would significantly boost your visibility! |
It will be much easier to create your own backend, or to reuse an exiting one. For example, you could implement class MyPort implements RPC.Port {
_listener;
constructor(public postMessage: (typeof RPC.Port)['postMessage']) {}
public emit(value) {
this._listener?.(value);
}
public on(_event, listener) {
this._listener = listener;
}
public off() {
this._listener = null;
}
}
const back = new MyPort((value) => front._listener(value));
const front = new MyPort((value) => {
if (!RPC.isMessage(value)) return;
// Do something
const newValue = value; // pretend something got changed
back._listener(newValue);
});
const interceptedFS = InMemory.create({ name: 'example' });
attachFS(back, interceptedFS);
await configure({
mounts: {
'/': { backend: Port, port: front },
},
});
Could you please clarify what exactly you're talking about? A lot of stuff has happened over the past few months... |
Hey @zardoy, I've been going through the dependents of browserfs and found this repository.
As you already know, browserfs is deprecated and I am working on ZenFS.
Would you be interested in updating migrating to ZenFS?
The text was updated successfully, but these errors were encountered: