On Microsoft Windows and Mac OS X there are various special folders used for application data and user data. Here are some examples of the folder for application data which is shared between all users.
C:\Documents and Settings\All Users.WINDOWS\Application Data
C:\Documents and Settings\All Users\Application Data
Mac OS X:
The locations and folder names can differ between versions of the operating system, therefore it is useful to have a system-independent way to get the path at runtime. The function
Here is another example of differences between operating systems. On Windows Vista:
On Windows 98 SE:
On Mac OS X:
for more details.
On Windows NT-based systems there is a profile folder for each user. You can find the profile path for the current user with the function