1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Limit search scope in a NSMetadataQuery

Discussion in 'Mac Programming' started by Saphrosit, Oct 10, 2010.

  1. macrumors newbie

    Hi everybody, I need to limit the search scope of a NSMetadataQuery item. I know there's the setSearchScopes method, but it let me only decide the directories in which to search; what if I need to search in all directories except one or two? Is there a way to do that? (except, of course, set as search scope all the other directories!)
  2. Moderator emeritus


    From a quick glance at the docs, I would say you can't do this besides what you suggest, or filtering those directories out of the results.
  3. macrumors 6502

    No, there's no API to do that. It would probably be easier to just search everything and filter the results from the directories you wish to exclude.
  4. macrumors newbie

    Ok, thanks! (Maybe apple should think at something like that...)
  5. macrumors 6502

    File an enhancement request
  6. macrumors newbie

    How? I thought I could only report bugs or send feedbacks about products...
  7. macrumors 6502

    Just use bugreport.apple.com. You can file an enhancement request there.

Share This Page