Class: DirectoryWatcher::Scan

### Home Classes Methods

### In Files

- lib/directory_watcher/scan.rb

### Parent

Object

### Methods

- ::new
- #results
- #run

### Files

- History.txt
- README.txt

### Class/Module Index

Quicksearch

- DirectoryWatcher
- DirectoryWatcher::Collector
- DirectoryWatcher::Configuration
- DirectoryWatcher::CoolioScanner
- DirectoryWatcher::EmScanner
- DirectoryWatcher::Event
- DirectoryWatcher::EventableScanner
- DirectoryWatcher::FileStat
- DirectoryWatcher::Logable
- DirectoryWatcher::Notifier
- DirectoryWatcher::NullLogger
- DirectoryWatcher::Paths
- DirectoryWatcher::RevScanner
- DirectoryWatcher::Scan
- DirectoryWatcher::ScanAndQueue
- DirectoryWatcher::Scanner
- DirectoryWatcher::Threaded
- DirectoryWatcher::Version
- Object

No matching classes.

# 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.