Finding Files recursively on Mac?

Using recursive file searches on a Mac results in Ruby digging into
Bundle Apps of all sorts, iCal backups, and plenty of other “Files” on
the Mac which are really folders that get special treatment by the OS
(and which you don’t want returned in a recursive file search).

Does anyone have a method which searches recursively but doesn’t go into
Application Bundles and others folders which look like files to the Mac
OS?

TIA for any suggestions…

On Nov 4, 2012, at 15:12 , Vince A. [email protected] wrote:

Does anyone have a method which searches recursively but doesn’t go into
Application Bundles and others folders which look like files to the Mac
OS?

To do that properly, you need to use NSFileManager to ask if a given
folder is a bundle or not. You can do that trivially with macruby or use
the older ruby/objc bridges. It is not fun either way.

Ryan D. wrote in post #1082807:

To do that properly, you need to use NSFileManager to ask if a given
folder is a bundle or not. You can do that trivially with macruby or use
the older ruby/objc bridges. It is not fun either way.

I just dabble with Ruby and I have been striving to pay more attention
to it and attempting to learn a little MacRuby on the side, but right
now, most of my programming time is spent flipping between Textmate and
Ruby documentation looking things up. NSFileManager hasn’t even been on
my radar! But I have a feeling it will be soon. Thanks Ryan, I will see
what I can accomplish there…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs