FolderItem methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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.


💬 Ask a question or report a problem