-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Configurable fs #1835
Comments
I think the easiest way is to look at lightningFS library that implements fs module that can be used in web browser. |
Ok Thanks for your response! |
There is information in README: Providing a custom backend (advanced usage). The sad thing is that the custom backend is almost like an entirely new implementation of fs. I've added a way to swap Key/Value pair (db option) in lightning-fs, and was always wondering what is the point of custom backend if it's like your own lightning-fs library. |
I have seen it but how I will pass my custom
Yes it's totally like having a own fs |
It seems there is an option backend: https://github.com/isomorphic-git/lightning-fs/blob/main/src/PromisifiedFS.js#L82C29-L82C36 But it's not in TypeScript definition. If you don't use TypeScript you can try it. And if you use TypeScript maybe you will need to put |
Yeah there are some issues in lightning fs typings declaration file as it makes db option required. For now I have modified it and tested And I want to ask that how can I overide the default function that disturb the filepath as in my case when I pass these type of paths : Also noticed one error that occurs when ever I start my app but it doesn't the affect any thing , here is the screenshot of error:
|
Don't call the init function it's an internal method. |
Ok but what about this one 👇
Edit: I have used like this but still same error: this.fs = new FS("myfs", { backend: customBackend }); |
I think that it will be much simpler to just implement your own fs and all the methods that are required. But if you would like to use lightning-fs you will need to fork it and modify to not normalize the path (or whatever function it used for paths). |
Ok |
Is there any way to configure any type of
fs client
to isomorphic-git?As in my case I have to use
cordova-plugin-file
for fs stuffs but isomorphic-git only supports nodejs like fs only(i guess)I have to integrate isomorphic-git for git client in this app and here is it's fs which uses
cordova file
, sdcard plugin etc.Any solution will be appreciated 🤗
The text was updated successfully, but these errors were encountered: