|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
I'm new to the list so please bear with me. I don't know anywhere I can search the previous posts of this discussion board and google hasn't been any help.
I'm writing a program and I need to access the contents of the files that are returned after an MDQuery. I can get the file paths from the query and then just read in the file contents manually, but I'm wondering if I can get this information directly from the query results. After all spotlight can search by contents so I think there must be a way. After some searching I found the kMDItemTextContent field but when I access that field from the query results I always get NULL returned instead of the file contents.
I'm also looking at how QuickLook can display the file contents. For example, with an applescript file spotlight does not index their code without a 3rd party plugin. But if I pull up the QuickLook window for an applescript file the code is displayed. So I'm wondering how QuickLook gets the text of a file too.
I'm hoping someone can point me in the right direction of how to access the code of files without manually reading in the code text. I hoping I can get it right from an MDQuery of some kind of QuickLook query.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Spotlight-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.