NextPrevUpTopContentsIndex

get-folder-path

Function
Summary

Gets the path of a special folder on a Windows or Mac OS X machine.

Package

system

Signature

get-folder-path what &key create => result

Arguments

what

A keyword.

create

A boolean.

Values

result

A string naming the path, or nil .

Description

The function get-folder-path obtains the current value for various special folders often used by applications. It is useful because these paths may differ between versions of the operating system. get-folder-path is implemented only on Windows and Mac OS X.

what indicates the purpose of the special folder. For instance, :common-appdata means the folder containing application data for all users.

The following values are recognized on Windows and Mac OS X:

:appdata , :documents , :my-documents , :common-appdata , :common-documents and :local-appdata .

:documents is an alias for :my-documents .

The following values are recognized on Mac OS X only:

:my-library , :my-appsupport , :my-preferences , :my-caches , :my-logs , :common-library , :common-appsupport , :common-preferences , :common-caches , :common-logs , :system-library .

On Mac OS X, :appdata is an alias for :my-appsupport , :common-appdata is an alias for :common-appsupport , and :local-appdata is an alias for :common-appsupport .

If the folder does not exist and create is true, the folder is created. The default value of create is nil .

If the folder does exist, result is nil .

See also

get-user-profile-directory


LispWorks Reference Manual - 6 Apr 2005

NextPrevUpTopContentsIndex