NextPrevUpTopContentsIndex

22.8 Special Folders

On 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.

On Windows XP:

C:\Documents and Settings\All Users.WINDOWS\Application Data

On Windows 2000:

C:\Documents and Settings\All Users\Application Data

On Windows NT4.0:

C:\WINNT\Profiles\All Users\Application Data

On Mac OS X:

/Library/Application Support

The locations and folder names 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 system:get-folder-path can be used to retrieve the path to special folders.

Here is another example of the difference between operating systems. On Windows NT4.0:

(sys:get-folder-path :my-documents)
=>
"C:\\WINNT\\profiles\\dubya\\Personal"

On Windows 98 SE:

(sys:get-folder-path :my-documents)
=>
"C:\\My Documents"

On Mac OS X:

(sys:get-folder-path :my-documents)
=>
"/u/ldisk/dubya/Documents"

See the LispWorks Reference Manual for more details of sys:get-folder-path .

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 sys:get-user-profile-directory . See the LispWorks Reference Manual for more details.

 


LispWorks User Guide - 8 Apr 2005

NextPrevUpTopContentsIndex