Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
API to interact with guest OS Filesystem #335
Comments
|
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. |
|
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. |
|
Well actually, BrowserFS may not be needed. Chrome/HTML5 is bringing support for a native file API system. |
|
@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. |
|
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. |
|
It's being implemented to all modern browsers as a standard. The maintainers should use standards over 3rd party tools. |
|
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. |
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.