Platforms to show: All Mac Windows Linux Cross-Platform

ApplicationSupportFolderMBS(domain as Integer) as folderitem   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Special Folders MBS Util Plugin ✅ Yes ✅ Yes ❌ No ✅ Yes All
This item is deprecated and should no longer be used. You can use SpecialFolder module instead.
Returns a folderitem to this folder if it exists on that system.
Example
dim f as folderitem

f=preferencesFolderMBS(-32763)
if f=nil then // On Windows always nil
f=applicationsupportFolderMBS(-32763)
end if

msgBox f.NativePath

// example output:
// "Mac OS X:Users:cs:Library:Preferences:" on Mac OS X
// "Mac OS 9:Systemordner:Preferences" on a german Mac OS 9
// "C:\Dokumente und Einstellungen\Christian\Anwendungsdaten\" on a german Windows XP.

Note that not every folder exists on every Mac OS Version!
The codes for domain are (The Demo includes a module for these):
-32768On System Disk
-32767On Appropriate Disk
-32766System Domain, on Mac OS X mostly inside the folder /System.
-32765Local Domain (on Netbooting for example)
-32764Network Domain (on Netbooting for example)
-32763User Domain, on Mac OS X mostly inside the users folder.
-32762Classic Domain, the current used Classic System folder.
Also take a look on the CreateApplicationSupportFolder function.

Xojo ApplicationSupport function points to "/Library/Application Support" while ApplicationSupportFolderMBS points to different locations on my test system depending on the domain code:

-32768 -> "/Library/Application Support"
-32767 -> "/Library/Application Support"
-32766 -> nil
-32765 -> "/Library/Application Support"
-32764 -> nil
-32763 -> "/Users/cs/Library/Application Support"
-32762 -> "/Volumes/Mac OS 9/Systemordner/Application Support"
0 -> "/Library/Application Support"

At last it is your decision to use the correct one!

Some examples using this global method:

Some FAQ entries about this method:

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...