[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Roberto book, persistance, data structures
- From: Nicolas Devillard <ndevilla@...>
- Date: Wed, 18 Jul 2001 16:53:45 +0200 (MET DST)
On Wed, 18 Jul 2001, Philippe Lhoste wrote:
[...]
> The .ini format is fine, except it doesn't support multi-users (or you
> must handle these by hand), and it is not hierarchical.
The ini file format can be made hierarchical by reserving a character as a
separator in the section names. Example: with '/':
[Section/Subsection1]
[Section/Subsection2]
...
Use any character you want as long as it is not used in a section label,
and you have your hierarchical ini file. Not the best but you can find
parsers for ini file all over the place so you do not have to reinvent the
wheel. All depends on how hierarchical you need your file to be. XML might
also be a choice there.
As to making the ini file aware of different users, nothing prevents you
from using a naming scheme to do that, something like appli-user1.ini,
appli-user2.ini, etc.
Many, many solutions for config files out there. Have a look into
freshmeat for starters :-)
Cheers
--
Nicolas