1

Is there a set of functions that give you the file and/or the folder where to place an application's config?

I would like it to return the folder only and/or the file only on the appropriate place for each system.

Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76

1 Answers1

3

The functions you are looking for are the following:

Those functions will use the ApplicationName content to determine the name of the application. You can change that behaviour with the OnGetApplicationName callback.

You can have a look at what they return for each system on the Multiplatform Programming Guide wiki page.

Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
  • Two issues to be aware of: 1. These might return non-Unicode paths, so depending on your usage, you should use the *UTF8 versions of thee functions. 2. The result returned under OS X technically works but is hardly optimal for non-command-line apps. – Noah Sep 02 '13 at 04:11
  • @Noah : I've `find ... -exec grep ...` on the `fpcsrc` folder and I haven't found any UTF8 derivatives. Could you elaborate a bit more so I can update my answer? Many thanks!! – Gustavo Carreno Sep 03 '13 at 13:17