Skip to content
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

API to interact with guest OS Filesystem #335

Open
jcubic opened this issue May 3, 2020 · 8 comments
Open

API to interact with guest OS Filesystem #335

jcubic opened this issue May 3, 2020 · 8 comments

Comments

@jcubic
Copy link

@jcubic jcubic commented May 3, 2020

There is library BrowserFS that allow to use Node.js fs module in browser, you can build real file system using its functions.

It would be cool if v86 would support this FS instead of flat json and URLs file that allow to one way communication. With BrowserFS you can create FileSystem were you can share the files with host and guest and would work both ways.

@jcubic
Copy link
Author

@jcubic jcubic commented May 3, 2020

For the current API (to be able to send files from host to guest) you only need single function that is called in JS, that refresh the FS from ouside. Right now you need to unmount modify the FS and mount it again. Also change in FS from Linux is not reflected in BrowserFS because the API is read only you can only send files from host to guest the other way is not possible.

@jcubic
Copy link
Author

@jcubic jcubic commented May 3, 2020

To not break the API I would add events createDirectory/deleteDirectory/createFile/deleteFile/writeFile with this you can write layer on top to write to BrowserFS so you can have communication from guest to host.

@xeu100
Copy link

@xeu100 xeu100 commented Sep 17, 2020

Well actually, BrowserFS may not be needed. Chrome/HTML5 is bringing support for a native file API system.

@jcubic
Copy link
Author

@jcubic jcubic commented Sep 17, 2020

@xeu100 I would prefer to have an API that will allow to build something like this with any FS, to actually interact with the system, I would not like to rely on something that is only in Chrome.

Right no you can't do any data passing, except poorly documented read only URL based file system that can't change from outside while the system is running.

@xeu100
Copy link

@xeu100 xeu100 commented Sep 17, 2020

@xeu100 I would prefer to have an API that will allow to build something like this with any FS, to actually interact with the system, I would not like to rely on something that is only in Chrome.

Right no you can't do any data passing, except poorly documented read only URL based file system that can't change from outside while the system is running.

Actually it's being implemented on other browsers such as Firefox as well, with the same standards. The native file system API is read and write without a weird download system, it's about to become available in Chrome m86 and then newer versions of modern browsers. It's much more efficient than having a nodejs server be required.

@jcubic
Copy link
Author

@jcubic jcubic commented Sep 18, 2020

BrowserFS have bigger support if the library had the proper API you should be able to use any browser API you want. You don't need to use node.js with BrowserFS unless you mean current implementation.

@xeu100
Copy link

@xeu100 xeu100 commented Sep 18, 2020

It's being implemented to all modern browsers as a standard. The maintainers should use standards over 3rd party tools.

@jcubic
Copy link
Author

@jcubic jcubic commented Sep 18, 2020

I don't want integration with 3rd party tool I want API build in, so I can use it to use whatever API I want, If API exist you can use file system API that will not work in every browser unless you wait few years and I can use whatever I want. Right now you can interact with the guest OS. I prefer something that will work in every browser.

@jcubic jcubic changed the title BrowserFS support API to interact with guest OS Filesystem Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.