ini.d 0.5
Portable module for reading and writing INI files.
Download INI Library ini.d.
Note:
the Ini object does not keep the INI file open
at all times. If a relative path is used, changing the current directory
will cause the file to be saved in the new directory. The current directory
can also change when using some common dialogs in Microsoft Windows.
Solution:
use an absolute path. Functions in std.path and std.file can help:
if(!std.path.isabs(iniFileName))
iniFileName = std.path.join(std.file.getcwd(),
iniFileName);
Update:
the Ini object no longer saves in the destructor because if it is the
garbage collector deleting it, some value or section object could have
been destructed first, resulting in undefined behavior, such as an
access violation.
Solution:
save() before you exit your program or you will lose changes.
|