Method: Inmake::Config.resolveFiles

Defined in:
lib/inmake/config.rb

.resolveFiles(cfg) ⇒ Object



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/inmake/config.rb', line 144

def self.resolveFiles cfg
  newFiles = []
  cfg.files.each do |f|
    if File.exist? f 
      if File.file? f
        newFiles << f
      elsif File.directory? f and cfg.dirMode == :acceptDirs
        newFiles.concat Dir[File.join(f, '**/*.*')].select {|x| File.file? x }
      end
    end
  end

  cfg.files = newFiles.map { |x| File.expand_path x }
  cfg
end