class WhiteCloth::Projections::DirFile

Create a Projection for the specified directory

Public Class Methods

new() click to toggle source

Default constructor

# File lib/projections/project_dir.rb, line 24
def initialize
  @file_stack = WhiteCloth::DataStructures::FlatTree.new
end

Public Instance Methods

project(path) click to toggle source

Run the projection function, taking path as the {File#glob} shell glob for the path and pattern to match when looking for files

# File lib/projections/project_dir.rb, line 31
def project(path)
  
  # Walk the path,
  Dir.glob(path){|file_name|
    
    # Ignore directories
    unless File.directory?(file_name) then
      
      # Ignore the special files as well
      unless file_name == "." or file_name == ".." then
        

      end        
    end
    
  }
  
end