ApplicationSupportFolder Function

Returns a reference to the Application Support directory, if one exists.

Syntax
result = ApplicationSupportFolder( )

Return Value
Result | FolderItem | A FolderItem that refers to the Application Support folder.

# Notes

The Application Support folder may contain code and data files needed by third-party applications. These files should usually not be written to after they are installed. In general, files deleted from this folder remove functionality from an application, unlike files in the Preferences folder, which should be non-essential.

The SpecialFolder module enables you to access many special folders that are managed by the OS.

## Windows

On Windows, ApplicationSupportFolder returns a reference to the \Documents and Settings\user\Local Settings\Application Data directory.

## Macintosh

On Mac OS "classic", ApplicationSupportFolder returns a reference to the Application Support folder in the active System folder. On Mac OS X, ApplicationSupportFolder returns a reference to the /Library/ApplicationSupport folder.

## Linux

On Linux, ApplicationSupportFolder returns a FolderItem for the Home directory for the logged in user, /home/username/. Typically, when an application wants to create an application support file, it will create a folder in the Home directory corresponding to the application's name. For example, for MyApp, it will use the path: "/home/username/MyApp/".

# Example

The following example displays the full path to the Application Support folder, if there is one.

Dim f as FolderItem
f=ApplicationSupportFolder
If f <> Nil then
MsgBox f.absolutePath
else
MsgBox "No Application Support folder found."
end if

# See Also

DesktopFolder, FontsFolder, PreferencesFolder, ShutDownItemsFolder, StartupItemsFolder, SystemFolder, TemporaryFolder, TrashFolder, SpecialFolder functions.