Environment.SpecialFolder on Windows, Linux and OS X

While developing Pkcs11Admin – multiplatform application written in C# – I was trying to figure out where to store log file so it can be easily reached by the user on all supported operating systems – Windows, Linux and Mac OS X.

To avoid hardcoding I wanted to use System.Environment.SpecialFolder enumeration but I was not quite sure which member to choose because the documentation does not contain the actual paths. So I have created simple test application which dumps these paths and executed it on Windows 8.1 with .NET Framework 4.5, on Ubuntu 14.04 LTS with Mono 3.2.8 and on Mac OS X 10.10.1 Yosemite with Mono 3.10.0. Here are the results:

Continue reading Environment.SpecialFolder on Windows, Linux and OS X