Status Quo
BaseDirs::config_dir: {FOLDERID_RoamingAppData}
BaseDirs::data_dir: {FOLDERID_RoamingAppData}
ProjectDirs.config_dir: {FOLDERID_RoamingAppData}/_yourprojectname_/
ProjectDirs.data_dir: {FOLDERID_RoamingAppData}/_yourprojectname_/
One of the issues with this is that applications that provide global overrides (like cargo's $CARGO_HOME
) will end up putting things into the same directory, if no sub-directories are used.
So at the point in time when people want to migrate from $CARGO_HOME
back to the standard setup, they will go through the $CARGO_HOME
dir and need to sort out which of the files are config, cache, data etc.
Alternative A: Add config/data sub-directories to the paths of both BaseDirs::{config,data}_dir
and ProjectDirs.{config,data}_dir
BaseDirs::config_dir: {FOLDERID_RoamingAppData}/config/
BaseDirs::data_dir: {FOLDERID_RoamingAppData}/data/
ProjectDirs.config_dir: {FOLDERID_RoamingAppData}/_yourprojectname_/config/
ProjectDirs.data_dir: {FOLDERID_RoamingAppData}/_yourprojectname_/data/
Benefits:
- More overall consistency across Linux, macOS and Windows
- config and data is cleanly separated, not put into the same folder
Drawbacks:
- Not an established standard on Windows. The structure might be fine for the project directories, but less so for the general base directories.
Alternative B: Add config/data sub-directories only to the paths of ProjectDirs.{config,data}_dir
BaseDirs::config_dir: {FOLDERID_RoamingAppData}/
BaseDirs::data_dir: {FOLDERID_RoamingAppData}/
ProjectDirs.config_dir: {FOLDERID_RoamingAppData}/_yourprojectname_/config/
ProjectDirs.data_dir: {FOLDERID_RoamingAppData}/_yourprojectname_/data/
Benefits:
- Slightly more overall consistency across Linux, macOS and Windows
- config and data of applications is cleanly separated, not put into the same folder
Drawbacks:
- Slightly less internal consistency of
BaseDirs
and ProjectDirs
on Windows.
Additional Consideration
BaseDirs::cache_dir: {FOLDERID_AppData}/cache
Note the cache
directory that is appended to the path. It might make sense to consider whether it makes sense to change this, depending on the alternative that is picked.