path to plugin (config ) files

Posted on
Sat Oct 27, 2018 4:39 pm
kw123 offline
User avatar
Posts: 8365
Joined: May 12, 2013
Location: Dallas, TX

path to plugin (config ) files

I remember that there is now a standard way to store plugin related (config) files somewhere in the
/Library/Application Support/Perceptive Automation/xxxx
directory.

have spend an hour to find the post, any hint would be appreciated


Karl

Posted on
Sat Oct 27, 2018 4:54 pm
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: path to plugin (config ) files

https://wiki.indigodomo.com/doku.php?id ... older_path

Code: Select all
name=indigo.server.getInstallFolderPath()


Use that to create the pathname for your files.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Oct 27, 2018 5:42 pm
kw123 offline
User avatar
Posts: 8365
Joined: May 12, 2013
Location: Dallas, TX

Re: path to plugin (config ) files

thats just the path to "/Library/Application Support/Perceptive Automation/Indigo 7.2"

I thought there is a specific subdirectory with naming convention ie like for the plugin specific log files like this:
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 7.2/Logs/com.karlwachs.uniFiAP
And is it a good idea to have this in the version subfolders (/Indigo 7.2) and not one level higher, so that it does not change with version numbers or should it?

A suggestion: call it "pluginConfigs" either at:
Code: Select all
/Library/Application Support/Perceptive Automation/pluginConfigs
or
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 7.2/pluginConfigs
and each plugin should use the pluginid as sub directory name eg:
Code: Select all
/Library/Application Support/Perceptive Automation/pluginConfigs/com.karlwachs.uniFiAP
or
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 7.2/pluginConfigs/com.karlwachs.uniFiAP

comments suggestions welcome .. but before I code this I would like to get an ok from Matt/Jay
Karl

ps and no "é" or "ä" in the names please

Posted on
Sat Oct 27, 2018 8:54 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: path to plugin (config ) files

For a log folder relative path try using indigo.server.getLogsFolderPath(self.pluginId).

I assume you have more data than you can reasonably store in just the pluginPrefs dict (automatically managed/saved by Indigo)? If so and you need to create a configuration folder I would suggest:

pluginConfigFolder = indigo.server.getInstallFolderPath() + "/Preferences/Plugins/" + self.pluginId

Your plugin will need to create the folder yourself if it doesn't already exist. Note the folder will be created directly next to your plugin's preference file (that Indigo automatically manages).

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 8 guests