wasavi
wasavi copied to clipboard
local filesystem support
Would it be possible to support the browser-local filesystem?
I sometimes come around to use wasavi in preference over a local notepad to write more complex texts, where the power of vi shortcuts come in really handy, but then the only way to transfer the data out is either using the clipboard (which sometimes doesn't work due to sheer size or issues like corruption) or writing it out to cloud service (which might be considered by corporate security as a breach or security incident or data leakage).
Access to the local filesystem would be really handy and is technicall feasabile nowaday (https://developer.chrome.com/apps/fileSystem http://www.html5rocks.com/en/features/file_access).
In my understanding,
- https://developer.chrome.com/apps/fileSystem is an API for chrome apps. By contrast, wasavi is chrome extension: extension can not manipulate a local file system.
- http://www.html5rocks.com/en/features/file_access is an API to operate "sandboxed" file system. This doesn't correspond to a local file system directly, and probably each file in the sandbox is encrypted.
Okay, after reading a bunch of further docs I think the easiest way would be a packaged Chrome app that uses the extension and provides the methods to save locally. Would you consider this?
I think so too, that is, cooperation of app and extension would help the local file accessing. So I tried filesystem API a little and found some pros and cons:
pros:
- Chrome extension can do local file access with the help of Chrome app
cons:
- to get an object of target file, I was forced to use file chooser dialog. I think this is very incompatible with some commands of vi, such as
:edit [path]
,:read [path]
,:write [path]
...
conclusion: local file access from Chrome extension is technically possible, but, only the user interface of file chooser dialog is a problem for vi. Are there any alternative way?
I learned filesystem API more deeply, then local file access will be possible now and wrote simple wiki document.
The local file access functionality can be used in next released wasavi.
Awesome. Happy to see you could make it work!
Do we need to install LFO in firefox, or is it supposed to just work?