File name configuration
Agreement? Mine would be, if my program were called "Bob"
, simply "bob.cfg"
.
I must admit that I have not had the slightest concern about this agreement. Maybe I've been here for too long :-)
Of course, if your configuration information is in a specific format (like XML), you might want to consider "bob.xml"
. But, really, I think it ".cfg"
just summarizes the intent just like any convention.
And, just to point out that the bleeding is obvious, don't name your file "bob.cfg"
if your program is actually named "George"
.
Please don't be offended, I don't really accept mickey, just answering an interesting question in the tone of my weird sense of humor. You wouldn't be the first to misunderstand my humor (my wife, for example, despairs of her in most cases).
source to share
I'm not sure if you mean the base filename if your question also includes where to put the config file. Anyway, in place:
If it is a linux application, you must follow the XDG Base Directory Specification (XDG -> Cross Desktop).
It says that you should put your config files in a folder named after your program in $XDG_CONFIG_HOME/programname/
. XDG_CONFIG_HOME
usually~/.config
source to share