FLTK logo

Re: [fltk.general] Where does Fl_Preferences file actually get stored?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Where does Fl_Preferences file actually get stored? "anmol.... Apr 30, 2021  
 
I am copying a default version of the prefs file into a string during compilation. When the constructor is called (i.e. runtime), I detect the absence of a file and copy the default file.
Can I confirm that the prefs file is created *ONLY* after the first read (i.e. get()) call ?

So
        prefs = Fl_Preferences(Fl_Preferences::USER, vendor, product);
will not create a prefs file until the first
prefs.get() or prefs.set()


On Saturday, April 25, 2015 at 12:46:47 PM UTC+5:30 Matthias Melcher wrote:

Why does reading a value create a file? Well, I saw the preferences as a database, and tried to provide database access, not file access (this is why I never published the format of the file or the location. It simply should not matter). Reading an entry creates the entire database structure and file. You can mix reading and writing calls at any time. It's always random access, so it always requires the infrastructure.

Matthias

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/1ed40daa-b138-4a2c-bb3c-09d2211773ccn%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.