Hacker News new | past | comments | ask | show | jobs | submit login

It's not at all like INI files. INI files have field names and section delimiters in them. An INI files might be:

  [UI]
  DarkMode=1
  Theme=solarized
  [Options]
  Indent=4
  InventMode=tabs
Whereas this file system config would have individual files per value.

  <user-home>/.config/<app-name>/UI/DarkMode.bool --> 1
It's a single byte file. You read the entire file contents and if it's not zero, it's true. The existence of the file tells you whether or not to use a default value. An INI file would have to be fully parsed before we know whether it contains a value for that config value.

  <user-home>/.config/<app-name>/UI/Theme.txt --> solarized
You read the entire file contents, trim leading and trailing whitespace and toLower for good measure if you want, then validate against your list of installed themes. Done. No goofy JSON or YAML parser in site.

And what reinvention is there? If you're just using a system that already exists, you're not reinventing anything.




Sort of an homage to the windows registry, but it's not a "secret 3rd thing" it's just another folder.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: