Comments (7)
Hi @abose,
Nice to hear from you. Funnily enough the reason I got involved with Filer in 2015 was because my team also ported Brackets to the web as part of Mozilla's Thimble editor. We went on to use Filer+Brackets as part of Thimble with Mozilla for many years, and it worked great. I've also used filer as a backing filesystem for a Linux VM running in the browser, and it works great there too, see https://humphd.github.io/browser-shell/.
At this point, Filer is stable and not actively being extended. We haven't added File System Access API support, no. It could be done by someone, but I'm not going to have time to do it this year.
If you're interested in hacking on/with Filer, I can answer questions and do reviews.
from filer.
Cool, looks like this is just the lib that is needed.
We will contribute to adding this feature in filer. Hoping to get support for our dev https://github.com/tapanmanu to implement the change :)
from filer.
Hi, @humphd Thanks for the quick response! I was reading thimble and closely followed the bramble project a while back. Bramble gave us confidence that phoenix could be done as it was already done once before and bramble also contributed changes to brackets at the time. Hopefully, we can port in the live preview implementation from thimble to phoenix.
Will evaluate if we can contribute the feature from our side to filer. would help to get clarity on a few questions:
- Can filer work with indexedDB in a separate web worker.
- Can a web worker and main thread simultaneously access the same indexed DB source. We are planning to offload certain code intellisence/background-related file access functions(mostly read-only) into separate web workers. Will it create problems with filers current architecture?
- is there any performance issues or throttling issues when a large number of file operations are done with indexedDB backend.
- Finally, What would be the high-level tasks that should be done to add the native fs backend to filer? How complex is the task to add a new backend?
Thanks again for the help!
from filer.
1. Can filer work with indexedDB in a separate web worker.
Yes, you can run it in workers. I'm running it in a Service Worker with https://github.com/humphd/nohost, but it works fine in any type of worker.
2. Can a web worker and main thread simultaneously access the same indexed DB source. We are planning to offload certain code intellisence/background-related file access functions(mostly read-only) into separate web workers. Will it create problems with filers current architecture?
Yes, it will work fine. This isn't specific to Filer, just how indexeddb works in general. It's easy to work with the same DB across widows or worker contexts.
3. is there any performance issues or throttling issues when a large number of file operations are done with indexedDB backend.
I haven't run into major issues, but as always, it will depend on what you mean by "large."
4. Finally, What would be the high-level tasks that should be done to add the native fs backend to filer? How complex is the task to add a new backend?
I haven't read the spec for it, so I have no idea.
from filer.
Being implemented in fork, for updates: https://github.com/aicore/filer/projects/1
from filer.
@humphd Update on the current state of things. Have implemented the base support as part of filer. Still, a lot more work to be done. [unit tests, API completeness]
- All the code changes done till now can be found here.
- FS access apis does not have rename/move support yet. raised an issue in WICG/FS access for the same.
API spec
- The entry point is to call
fs.mountNativeFolder()
API which will mount the file system to an existing filer context under the/mnt/<unique folder name>
folder. The changes will be broadcasted to all filer instances in the domain(including web workers) and persisted across browser tab closes(Though it will prompt for permissions as required). - After that all existing filer fs/shell APIs should work as usual.
Trying it out
Phoenix editor has been integrated with the new Filer APIs and we have got partial functionalities restored with native file access in chrome/edge. Try out in this link.
- use
file> open folder
menu in phoenix to open a folder in the local machine.
Queries
- Would filer like to get the upstream merge only after we have all changes done and stabilized in our fork?
- There are significant feature gaps in the current fs access APIs, so most APIs except the basic RW APIs will throw
Errors.ENOSYS('Filer native fs function not yet supported.');
. We can only add support incrementally to these new APIs as the standard evolves.
from filer.
All changes that is required to add fs access apis moved to phoenix for better integration.
Please see https://github.com/aicore/phoenix/tree/main/src/phoenix for implementation details if anyone is interested. Closing issue as phoenix used a different way to implement fs native access compatibility with nodejs fs apis.
from filer.
Related Issues (20)
- Support fs.open() flags being a number vs. string HOT 5
- Add find_symlink_node() to allow l* methods (lstat, lchown, etc) to use find_node like functionality HOT 4
- Export FS type to the user HOT 2
- Shell.mkdirp does not support relative paths HOT 4
- Use case HOT 1
- npm test only running shim tests HOT 10
- Incorrect documentation for Buffer shim HOT 2
- path module not shimmed correctly
- BUG: unexpected failures when calling fs functions (e.g. writeFile) with empty options object HOT 4
- BUG: fs.readdir fails when passing options HOT 4
- BUG: fs.mkdir does not recursively create parent directories when called with { recursive: true } HOT 2
- Add tests for new code paths from PR #774 HOT 1
- fs.opendir not implemented
- Typescript Support HOT 2
- GitHub Actions Workflow failing
- Webpack entry cannot be found after importing filer HOT 15
- Shims are not available in NPM package HOT 8
- Critical dependency: the request of a dependency is an expression HOT 3
- Maintenance of Filer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filer.