Limit search scope in a NSMetadataQuery

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

  1. macrumors newbie

    Joined:
    Oct 10, 2010
    #1
    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

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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

    Joined:
    Jul 25, 2006
    #3
    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. thread starter macrumors newbie

    Joined:
    Oct 10, 2010
    #4
    Ok, thanks! (Maybe apple should think at something like that...)
     
  5. macrumors 6502

    Joined:
    Jul 25, 2006
    #5
    File an enhancement request
     
  6. thread starter macrumors newbie

    Joined:
    Oct 10, 2010
    #6
    How? I thought I could only report bugs or send feedbacks about products...
     
  7. macrumors 6502

    Joined:
    Jul 25, 2006
    #7
    Just use bugreport.apple.com. You can file an enhancement request there.
     

Share This Page