Recommended location for saving a config files

RBA

Well-known member
If we have a module that uses an internal config file (for example, to preserve certain settings between sessions), is there a recommended location for saving that file? Same location as the license file? $PXI_LIBDIR, $PXI_BASEDIR/library or PXI_BASEDIR/etc ?? Is there anything in the PCL returning a default path for these tasks? Thanks,
RBA
 
Files cannot be created on core application distribution directories because they are system protected directories on all supported operating systems:

/opt/PixInsight on FreeBSD and Linux
/Applications/PixInsight on macOS
C:/Program Files/PixInsight on Windows

The standard way to store and manage module settings is the Settings class on the PixInsight/PCL platform. See the corresponding documentation:


Settings integrate with the PixInsight core application in a completely transparent and platform independent way. You'll find many examples of use in most open-source modules on our official repositories.
 
Back
Top