Can chrome extension create, save and read simple text file locally (in extension folder)?


I was exploring different possibilites of storing data and managing files but it has a lot of restrictions.

What I need is to create a file with a hardcoded name, for example "notes.txt", save some random text into the file and to be able to read this file. The file can be stored anywhere where allowed (somewhere in extension folder?)

I was reading a lot about it, but I am not sure if it is even possible. Pls note that the permission "fileSystem" in chrome extension is causing warning:

'fileSystem' is only allowed for packaged apps, but this is a extension.

Is it possbile to do that?

Update I'm sorry that I'm not skilled enough. For example I saw a lot of references to FileSystem API, as @DanielHerr suggests in comment, or other "tips & tricks", but I do not see a definite answer to my question. The article states:

With the FileSystem API, a web app can create, read, navigate, and write to a sandboxed section of the user's local file system.

Whoaa, looks like salvation. I can create, read, navigate, even write. Except that I am not writing a web app, I'm writing an extensions. As I mentioned before there is a warning (see qouted warning above).

Show source
| save   | file   | permissions   | google-chrome-extension   | filesystems   2016-12-30 15:12 0 Answers

Answers ( 0 )

◀ Go back