Get path of the currently installed plugin

Hello,

I’m new to UXP development, I’m trying to get the path of the current plugin and checking the following reference:

https://developer.adobe.com/xd/uxp/develop/reference/uxp/storage-index/

so far I’ve got this:

const fs = require("uxp").storage.localFileSystem;
const pluginFolder = await fs.getPluginFolder();

I was expecting to get the full path as string, but no luck, anyone can offer a working code that’ll fetch the path in a variable? TIA!

PS: I’m not much experienced with js async functionalities

First - what are you actually looking for? You posted a question under Photoshop UDT category (changed to Ps UXP now), asking about file storage (which has nothing to do with UDT) and added a link to XD docs :thinking:

Anyway, for Photoshop, after your two lines, check

console.log(pluginFolder.url, pluginFolder.nativePath)

Your folder is basically an Entry

Thanks for your response!

Did I post in the wrong section? If so then sorry, but I can’t quite figure out the mistake.

I’m trying to create a Photoshop UXP plugin (using vanilla JS so far), and I think I did post it under UXP Plugin API section, please do guide me the right way if I’m wrong, thanks!

I just noticed the link says Adobe XD, sorry again, but seems it’s also works for PS.

And thanks to you, I got my answer, pluginFolder.nativePath is the one I was looking for so thanks again for guiding me to the right direction!

It was in UXP developer tool, but no worries, I changed to UXP plugin API. Glad the solution worked

1 Like

ah, got it now, thanks!