Dire
Complete cross-platform solution for data and user directories discovery.
|
This document tries to explain differences between the directories and which one you should use for certain things.
Some of that information is present in the reference as well.
First thing to note is that the difference only exists on window (but you should still opt in for the proper semantic behaviour even if you want to target *nix or macOS).
On windows all base and project dirs begin in C:\Users\Foo\AppData
. Local ones in \Local
and non-local ones in \Roaming
.
The difference is important - on windows the files in roaming can be synchronized across the domain. This implies you should only store files specific to current machine configuration in the local directories and anything that can be synchronized should go into the non-local ones.
As for using the non local version, here's a short version of do's and dont's (here's a full version):
NOTE!
Technically since Windows 11 roaming data and settings is not deprecated and developers should integrate with Azure App Service instead to properly support cross platform syncing.
Relevant references:
The difference exists only on macOS (but you should still opt in for the proper semantic behaviour even if you don't target it).
Even though macOS exposes proper directories for different application files, mostly located in $HOME/Library/...
, a lot of applications (mainly power user/developer ones) write to directories one would expect to find on linux (like .config
instead of /Library/Application Support
).
For this reason, similar to directories-rs
and as per Apple's Standard Directories Guide two different directories are exposed - config
and preference
:
.config
and should generally be used for dev tools and such$HOME/Library/Application Support
and should be used for higher levels apps for your "typical joe", who wouldn't necessarily be snooping around files to try and find the configRelevant references:
The difference is simple:
Relevant references: