Location For User Config Files?

Post Reply
muleskinner
Posts: 10
Joined: Tue Aug 04, 2020 11:02 am

Location For User Config Files?

Post by muleskinner »

Hi,

I'm working on a module that needs to read xml config files created by users. I want to have it scan a directory at startup at present these config files as a popup list, kind of like presets I guess but more complex and unable to be created within the module itself.

Is there a standard location I should put a directory for these for Mac/PC and some kind of x-platform environment variable I can use to get its location or do I need to specify my own location for each platform?

cheers
User avatar
honki-bobo
Posts: 305
Joined: Sat Nov 09, 2019 1:18 pm

Re: Location For User Config Files?

Post by honki-bobo »

Hi,

you could use a dotted folder in the users home directory to store your XML files and retrieve the home directory location from system properties, like

Code: Select all

String sep = System.getProperty("file.separator");
String xmlDir = System.getProperty("user.home") + sep + ".myXmlDir" + sep;
Best regards,
Martin
Image
Monkey Business Audio
Modules - Music - Twitter - YouTube
Post Reply

Return to “Module Designer”