| Last Update: | Wed Apr 25 11:53:07 -0600 2007 |
This is a drop-in replacement for the find module currently in the standard library. It is modeled on a typical ‘find’ command found on most Unix systems.
rule = File::Find.new(
:name => "*.rb",
:follow => false,
:path => ['/usr/local/lib', '/opt/local/lib']
)
rule.find{ |f|
puts f
}
rake test (optional) rake install (non-gem) or rake install_gem (gem)
The current find module in the standard library is inadequate. It is, quite frankly, not much more than a plain Dir.glob call. This package provides an interface based on options typically available on your command line ‘find’ command, thus allowing you much greater control over how you find your files.
I am aware of the find2 package by Motoyuki Kasahara, but it supports very few options, hasn‘t been updated in over six years and isn‘t packaged properly.
See the RDoc documentation for more details about these options.
More options will be added as time permits, and requests will definitely be considered. Please log any feature requests on the project page at www.rubyforge.org/projects/shards.
Some specific things I plan on adding:
Generally speaking, anything that would require mucking around with C code or is just too difficult to implement in a cross platform manner will not be supported. These include the following options:
None that I‘m aware of. Please log any bug reports on the project page at www.rubyforge.org/projects/shards.
Ruby‘s
(C) 2007, Daniel J. Berger, All Rights Reserved
Daniel J. Berger