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
.