8 | | * configuration files should go in B_USER_SETTINGS_DIRECTORY; and the path should be obtained by the appropriate functions & constants, not hardcoded - use find_directory() ([http://ports.haiku-files.org/wiki/FindDirectory Examples for porting]). |
9 | | * The app must not write anything to the hard disk except in its own directory (B_APPS_DIRECTORY/AppName, or whatever the user installed it), the configuration directories (B_USER_SETTINGS_DIRECTORY, B_COMMON_SETTINGS_DIRECTORY), unless the user explicitly asks for it (a save dialog is a good example). <-- This makes little sense, as an application usually won't have the rights to write anything into its own directory. It may write to the user's cache, data, or settings directory, though, and that's pretty much it (axeld). |
| 8 | * configuration files should go in B_USER_SETTINGS_DIRECTORY; and the path should be obtained by the appropriate functions & constants, not hardcoded - use find_directory() ([http://ports.haiku-files.org/wiki/FindDirectory Examples for porting]). If the application has system-wide settings (not per-user), they should go in B_COMMON_SETTINGS_DIRECTORY. Note this distinction is so far only cosmetical, since Haiku is not yet capable of multi-user running. But it's etter to do it right from the start to make your application more future-proof. |
| 9 | * Beside the settings directory, applications may write data in other places in the config folder. Examples include the user cache and data folders. |
| 10 | * Applications should be self-contained, that is, all the files needed to run them should be in a single folder in B_APPS_DIRECTORY/ApplicationName. This is very different from the usual UNIX filesystem hierarchy (with binairies in "bin", and data in "share" or "etc"). This makes it simpler to track disk usage for each application, and allows having multiple versions of the app installed at the same time (in different folders). Note this folder should not be written to. Use the various configuration folders mentionned above, one ofthem should fit your needs. |