Class File::Find
In: find.rb
Parent: Object

Methods

find   new  

Constants

VERSION = '0.2.1'   The version of this package

External Aliases

name -> pattern

Attributes

atime  [RW]  Limits searches by file access time, where the value you supply is the number of days back from the time that the File::Find#find method was called. Note that the File::Find#find method itself alters the access times.
ctime  [RW]  Limits searches by file change time, where the value you supply is the number of days back from the time that the File::Find#find method was called.
follow  [RW]  Controls the behavior of how symlinks are followed. If set to true, then follows the file pointed to. If false, it considers the symlink itself.
ftype  [RW]  Limits searches to specific types of files. The possible values here are those returned by the File.ftype method.
group  [RW]  Limits searches to files that belong to a specific group ID.
inum  [RW]  Limits search to a file with a specific inode number. Ignored on MS Windows.
max_depth  [RW]  The maximum depth of
name  [RW]  The name pattern used to limit file searches. The patterns that are legal for Dir.glob are legal here. The default is ’*’, i.e. everything.
options  [RW]  The list of options passed to the constructor and/or used by the File::Find#find method.
path  [RW]  The starting path(s) for the search. The default is the current directory. This can be a single path or an array of paths.
perm  [RW]  Limits searches to files which have permissions that match the octal value that you provide. For purposes of this comparison, only the user, group, and world settings are used. Do not use a leading 0 in the values that you supply, e.g. use 755 not 0755.
prune  [RW]  Skips files or directories that match the string provided as an argument.
size  [RW]  If the value passed is an integer, this option limits searches to files that match the size, in bytes, exactly. If a string is passed, you can use the standard comparable operators to match files, e.g. ">= 200" would limit searches to files greater than or equal to 200 bytes.
user  [RW]  Limits searches to files that belong to a specific user ID.

Public Class methods

Creates and returns a new File::Find object. The options set for this object serve as the rules for determining what files the File::Find#find method will search for.

Public Instance methods

Executes the find based on the rules you set for the File::Find object. In block form, yields each file in turn that matches the specified rules. In non-block form it will return an array of matches instead.

[Validate]