Function | Package: windows | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## special-windows-directory

Arguments: directory-identifier &key create

This function finds a special Windows directory such as the My Documents folder or the Start Menu folder. This is useful if an application needs to find files in one of these special folders or to place files there.

Two values are returned. The first value is the directory pathname if it was found, or `nil` otherwise.

The second value indicates the status of the requested directory. If the directory was found, then the second value is `nil`. If the directory specifier is valid on this version of Windows but the directory itself does not exist, then the second value will be `:not-found`. If the directory specifier is not valid on this version of Windows, then the second value will be `:invalid`. If some other error code is returned then the second value will be `:unknown`.

directory-identifier should be one of the keywords listed below, or the SHGetFolderPath integer constant to which it corresponds.

If create is true and the requested directory is valid on this version of Windows but does not exist, then Windows will be asked to create the directory. It may not actually create it, however. If it does create the directory, its path will be returned.

Here are the possible keyword values for the directory-identifier argument. For their meanings, look up the Windows API function SHGetFolderPath at http://msdn.com and refer to the similarly named "CSIDL" constants.

- :admin-tools
- :alt-startup
- :app-data
- :bit-bucket
- :cd-burn-area
- :common-admin-tools
- :common-alt-startup
- :common-app-data
- :common-desktop-directory
- :common-documents
- :common-favorites
- :common-music
- :common-pictures
- :common-programs
- :common-start-menu
- :common-startup
- :common-templates
- :common-video
- :controls
- :cookies
- :desktop
- :desktop-directory
- :drives
- :favorites
- :fonts
- :history
- :internet
- :internet-cache
- :local-app-data
- :my-documents
- :my-music
- :my-pictures
- :my-video
- :net-hood
- :network
- :personal
- :profile
- :profiles
- :printers
- :print-hood
- :program-files
- :program-files-common
- :programs
- :recent
- :send-to
- :start-menu
- :startup
- :templates
- :system
- :windows

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version