Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Folderitem.SpotLightFileInfoMBS(uti as string = "") as dictionary
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Spotlight MBS MacOSX Plugin 10.0 Yes No No Yes, macOS only No
Function: Runs the spotlight metadata importer for this file and returns the dictionary with the metadata found in the file.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.numbers")
dim d as Dictionary = f.SpotLightFileInfoMBS

MsgBox "Title: "+d.Value("kMDItemTitle")
MsgBox "Text Content: "+d.Value("kMDItemTextContent")
Notes:
Returns nil on any error.
Works well with PDF, AppleWorks, Pages, Numbers, Word, Excel, Powerpoint and all other files, where you have an importer.
Does currently not find importers inside an application.

Some examples which use this method:

Feedback, Comments & Corrections

Folderitem.SpotLightLoadMDImporterMBS as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Spotlight MBS MacOSX Plugin 10.0 Yes No No Yes, macOS only No
Function: Loads another MDImporter.
Example:
dim f as FolderItem = GetFolderItem("/Developer/Applications/Xcode.app/Contents/Library/Spotlight/SourceCode.mdimporter", FolderItem.PathTypeShell)

if f.SpotLightLoadMDImporterMBS then
MsgBox "Loaded SourceCode importer."
end if
Notes:
By default importers are loaded from /Library/Spotlight, ~/Library/Spotlight and /System/Library/Spotlight. You can load another importers using this method.
Returns true on success and false on failure.

Some examples which use this method:

Feedback, Comments & Corrections

Folderitem.SpotLightTextContentMBS(uti as string = "") as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Spotlight MBS MacOSX Plugin 10.0 Yes No No Yes, macOS only No
Function: Runs the spotlight metadata importer for this file and returns the text content string for the file.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rtf")
MsgBox f.SpotLightTextContentMBS
Notes:
Returns an empty string on any error.
Works well with PDF, AppleWorks, Pages, Numbers, Word, Excel, Powerpoint and all other files, where you have an importer.
Does currently not find importers inside an application.

Some examples which use this method:

Feedback, Comments & Corrections

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





Links
MBS Xojo Plugins