Question

I have built a chrome extension which require data from a configuration file. I achieved it through NPAPI plugin but now I have to use PPAPI since Chrome is going to discontinue it Jan, 2014 onwards. Is it possible to load a file in PPAPI. If not, How to do this task through PPAPI?

Était-ce utile?

La solution

For security reasons, you can't load general files from the disk. If you want to store some data on disk, you can use the PPAPI File I/O routines to read and write from files in the domain-isolated filesystem Chrome maintains (shared with the HTML5 filesystem APIs).

Sadly, this will be more complicated than the simple C++ file I/O routines you're probably used to. I believe there should be some examples of doing file I/O in the Native Client SDK.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top