5

I'm creating a Chrome extension that (among other things) allow the user to open a local folder when he click on a "file:///" link.

I understand that it's can't be done in JavaScript without extension. (Open local folder from link) and I know that I can open the "download" folder, like this: chrome.downloads.showDefaultFolder();

My question is, if it possible via Chrome extension.


One more interesting point: In "extension" page (chrome://extensions/) in my extension section (which run from local folder) there is a link "Loaded from:" like this:

screenshot

When I click on this link the extension folder is open. I was searched the script who do this and I found this: chrome.send('extensionSettingsShowPath', [String(extension.id)]);

If I will understand what this line do, maybe I will know how to do this.

Community
  • 1
  • 1
Mosh Feu
  • 28,354
  • 16
  • 88
  • 135
  • 1
    [showPath](https://developer.chrome.com/apps/developerPrivate#method-showPath) only shows the specified extension's path, not an arbitrary one. I think the behavior you want can be implemented via [native messaging](https://developer.chrome.com/extensions/nativeMessaging). – wOxxOm Jul 08 '15 at 17:37
  • Possible duplicate of [How to open Windows Explorer (Windows+E) using Javascript](https://stackoverflow.com/questions/5587857/how-to-open-windows-explorer-windowse-using-javascript) – nycynik Sep 09 '18 at 20:08
  • @nycynik not necessarily at all. My question is about **chrome extension**, which have more possibility to allow the code to interact with the hosting Operation System than js in the browser. – Mosh Feu Sep 11 '18 at 18:36

0 Answers0