Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.LaunchServicesItemInfoMBS(WhichInfo as Integer) as LaunchServicesItemInfoMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Launch Services MBS MacOSX Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Return information about an item.
Example
dim l as LaunchServicesItemInfoMBS
dim f as FolderItem

f=SpecialFolder.Applications.Child("Mail.app")
l=f.LaunchServicesItemInfoMBS(-1)

if l.IsApplication then // True for mail.app
MsgBox "is Application"
end if

if l.IsContainer then // True for mail.app
MsgBox "is Container"
end if

if l.IsPackage then // True for mail.app
MsgBox "is Package"
end if

Returns as much or as little information as requested about the folderitem. Some information is available in a thread-safe manner, some is not.

Possible values you can combine for the WhichInfo parameter:
kLSRequestExtension = &h01Requests the item's filename extension.
kLSRequestTypeCreator = &h02Requests the item's file type and creator signature.
kLSRequestBasicFlagsOnly = &h04Requests all item-information flags that are not application-specific: that is, all except IsNativeApp, IsClassicApp, AppPrefersNative, AppPrefersClassic and AppIsScriptable.
kLSRequestAppTypeFlags = &h08Requests all application-specific item-information flags: that is, IsNativeApp, IsClassicApp, AppPrefersNative, AppPrefersClassic and AppIsScriptable.
kLSRequestAllFlags = &h10Requests all item-information flags.
kLSRequestIconAndKind = &h20Not used.
kLSRequestExtensionFlagsOnly= &h40Requests only the kLSItemInfoExtensionIsHidden item-information flag.
kLSRequestAllInfo = -1

Some examples using this method:

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


The biggest plugin in space...