How to get absolute path of the extension folder

546 views
Skip to first unread message

venkat

unread,
Jan 10, 2011, 8:54:18 PM1/10/11
to Chromium-extensions
Hi,

I've an extension which has some javascript and an NPAPI plug-in to
assist in some native functions, which I'm adapting to chrome. At one
stage, I need the extension to spawn a new process invoking a native
executable that resides in my extension folder. I'm planning to do
this in my NPAPI plug-in, but to do this, I need the full path to the
executable.

Is there anyway I can get full (or absolute) path of the extension
folder from inside chrome extension? Using chrome-extension:// URLs
won't help since I cannot pass these to native code.

Thanks,
Venkat.

FM

unread,
Jan 11, 2011, 2:12:12 PM1/11/11
to Chromium-extensions
I dont think you can do it with an API call, but if you know the
extension's ID then i think you can determine its absolute path.

look here - http://code.google.com/chrome/extensions/manifest.html#key

not sure as I have not tested it.

Arne Roomann-Kurrik

unread,
Jan 11, 2011, 6:09:50 PM1/11/11
to FM, Chromium-extensions
Yeah, there's no real need for a non-NPAPI extension to know this value, so there's no built-in API method to get it.  You'll have to calculate the path from native code instead.

~Arne


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Reply all
Reply to author
Forward
0 new messages