searching for contents in packaged files

Discussion in 'OS X El Capitan (10.11)' started by menashehertz, Dec 3, 2015.

  1. menashehertz macrumors newbie

    Joined:
    Dec 3, 2015
    #1
    Hi,

    In the process of learning Swift I create playgrounds and projects where I try out different things.

    When I want to look up something that I did but don't remember where I use a Finder window to search for some words in the Swift file and it finds it for me.

    The problem is the playground files. They are packaged and the actual swift is in a contents file which the finder does not see.

    I can't easily find what I am looking for. I looked at other products in the Apple store and nothing searches the contents of there files.

    Any ideas?

    Thanks Steven
     
  2. fisherking macrumors 601

    fisherking

    Joined:
    Jul 16, 2010
    Location:
    ny somewhere
    #2
    easyfind (check the applestore, or google it); you can set it to search EVERYWHERE or anywhere...including package contents..
     
  3. menashehertz thread starter macrumors newbie

    Joined:
    Dec 3, 2015
    #3
    Thanks for your help.

    I did try easyfind and yes it's able to find the package file using the file name. However was unsuccessful searching the contents of the packaged file.

    Steven
     
  4. fisherking macrumors 601

    fisherking

    Joined:
    Jul 16, 2010
    Location:
    ny somewhere
  5. menashehertz thread starter macrumors newbie

    Joined:
    Dec 3, 2015
    #5
    I did. That is how it was able to find the packaged file by name.
     
  6. menashehertz thread starter macrumors newbie

    Joined:
    Dec 3, 2015
    #7
    This worked to find the packaged file. but When I search for contents(using the phrase "Person" which exists) Screen Shot 2015-12-03 at 5.05.48 PM.png this is what happens.
     
  7. leman macrumors 604

    Joined:
    Oct 14, 2008
  8. menashehertz thread starter macrumors newbie

    Joined:
    Dec 3, 2015
    #9
    I'm really not familiar with find and grep. Are they suppose to search in Package contents?
     
  9. leman, Dec 4, 2015
    Last edited: Dec 4, 2015

    leman macrumors 604

    Joined:
    Oct 14, 2008
    #10
    These are command line tools which which you can search files in any location, and since bundles are just folders, yes, you can search stuff in it. For your use case, doing something like

    grep path_to_bundle -re "Person"

    should work.

    Also, you can use an editor like TextMate to search for a string or a regex in all files of a folder

    Edit: sorry, it should have been -re
     
  10. menashehertz thread starter macrumors newbie

    Joined:
    Dec 3, 2015
    #11
    leman,

    OK thanks for the ideas. I found that an editor can find the files in packages. Your help is much appreciated.

    Steven
     

Share This Page