Recent

Author Topic: How do you make config file?  (Read 5352 times)

Fernando M. M.

  • Guest
How do you make config file?
« on: March 19, 2006, 06:43:59 am »
I need to store some var. Something like config.cfg. But i don't want that users see this. How can i do this?

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: How do you make config file?
« Reply #1 on: March 19, 2006, 12:37:15 pm »
Why do you want to hide this from the users? The only options you have is to make the file hidden. But I always get the kreeps if some program tries to hide files from me. :)
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Anonymous

  • Guest
RE: How do you make config file?
« Reply #2 on: March 20, 2006, 03:25:26 am »
Because some of this options can make my program not work depending on the user's system.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
How do you make config file?
« Reply #3 on: March 20, 2006, 02:32:57 pm »
Why not us a typed file then?
Us some sort of record to store the  information in and save it.
This way you can store binary data (wich will be hard to interpret for anyone who cares to take a peek at the file contents).

Anyhow, if a user insists on opening the file in a text/hex editor and screw it up, that's his/hers problem isn't it ...
If I deliberately mess up sytemfiles of my OS I cannot complain to Bill Gates or Linus Torvald, now can I ;-)

On DOS/WIN you can include the hidden attribute for the file to make it  kind of hidden...
In Linux, let the filename start with a period (.)

Personally, lately, I tend to store these kind of data as text files.
If it gets corrupted, you can use a simpple texteditor to correct it (if you know what you're doing)

Bart

 

TinyPortal © 2005-2018