Parent

Methods

DirectoryWatcher::Scan

A Scan is the scan of a full directory structure with the ability to iterate over the results, or return them as a full dataset

results = Scan.new( globs ).run

Public Class Methods

new( globs = Array.new ) click to toggle source
# File lib/directory_watcher/scan.rb, line 8
def initialize( globs = Array.new )
  @globs = [ globs ].flatten
  @results = Array.new
end

Public Instance Methods

results() click to toggle source

Return the results of the scan. If the scan has not been run yet, then run it

# File lib/directory_watcher/scan.rb, line 23
def results
  @results = collect_all_stats if @results.empty?
  return @results
end
run() click to toggle source

Run the entire scan and collect all the results. The Scan will only ever be run once.

Return the array of FileStat results

# File lib/directory_watcher/scan.rb, line 17
def run
  results
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.