I would just like to know… Does this code work in linux and mac as well as windows?
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
The reason I ask is because I know that windows manages appdata differently than Mac and linux.
In Java, there is a difference in how to acquire the application data directory between Windows and unix operating systems. As for C#, the language your example code is in (despite the question being tagged “java”), I can’t say for sure.
In the past, I’ve always used the AppData folder on Windows and simply the unix home for unix systems.
Also note that on unix systems, it is preferable to make appdata in the user home hidden, so you should begin your files with
.on mac and linux.