Platforms to show: All Mac Windows Linux Cross-Platform

Back to MDItemMBS class.

MDItemMBS.AttributeBoolean(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the value for this attribute.

MDItemMBS.AttributeDouble(name as string) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the value for this attribute.

MDItemMBS.AttributeNames as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an array containing the attribute names existing in the metadata item.
Example
dim item as new MDItemMBS(SpecialFolder.Desktop)

MsgBox join(item.AttributeNames, EndOfLine)

Available in Mac OS X version 10.4 and later.

MDItemMBS.AttributeString(name as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the value for this attribute.
Example
dim item as new MDItemMBS(SpecialFolder.Desktop)

MsgBox item.AttributeString(item.kMDItemFSName)

MDItemMBS.AttributeStringArray(name as string) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the value for this attribute.

MDItemMBS.Constructor(path as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates an MDItem object for a file at the specified path.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rtf")
dim m as new MDItemMBS(f)

MsgBox m.DisplayName

path: A path to the file from which to create the MDItem.

Available in Mac OS X version 10.4 and later.

MDItemMBS.GetAttribute(name as string) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the value of the given attribute for the item.

name: The name of the desired attribute.

A variant, or nil on failure, or if the attribute does not exist, of if the attribute is not readable.

MDItemMBS.GetAttributes as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 17.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Queries all attributes with all names and values.

See also:

MDItemMBS.GetAttributes(names() as string) as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Spotlight MBS MacOSX Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the values of the given attributes for the item.

names: An array of the names of the desired attributes.
A dictionary where the keys are the attribute names, and the values are the attribute values, or nil on failure. If an attribute does not exist, or is unreadable, there will be no key-value pair for it in the dictionary.

See also:

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


The biggest plugin in space...