Search code examples
google-chromegoogle-chrome-extensiongoogle-chrome-appgoogle-chrome-os

Chrome extension/app write and read from local directory without user interaction


I'm developing a management app and extension and what I need to do now is manage a local directory in Chrome OS. I will download/edit/remove by server.

I've tried to use API localStorage, but it prompts the user to select directory.

I've also tried the downloads API, I can download the files and delete them, but I can't edit or see what's in the directory.

Is there any other way I can do it?

Thanks


Solution

  • The user needs to select the directory once and you need to have {"fileSystem":["write","directory","retainEntries"]} permission in the manifest. The directory only needs to be selected once. There is no workaround for this.