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 top right image
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 ?

        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.


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
To view this discussion on the web visit
Direct Link to Message ]
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]

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