Persistent Storage

Mr. Pib via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 11 15:21:53 PDT 2017


Does D have a persistent storage somewhere? I'd like something 
easy to use that allows me to load and save settings to disk in 
between executions of the program. I want to specify the variable 
to be saved or loaded and a default value.

e.g.,

Persist_Load(Some_variable, 100);

will load Some_variable from disk. If the storage does not exist 
on disk it will use the value 100.

It should manage the variables internally so it knows what is 
what. I don't mind actually specifying some_variable as a string 
to do this or using mixins and templates to achieve this, but it 
should be a one liner thing.


More information about the Digitalmars-d-learn mailing list