def reloadLoop(pathlist)
mylog = Logger['iowa_log']
pathlist.each do |path|
file = File.new(path)
fileMtime = file.mtime
mtime = @templateMTimes[path]
iwaPath = path.sub(/\.view$|\.vew$|\.htm$|\.html$/, '.iwa')
if File.exist?(iwaPath)
iwaMtime = File.stat(iwaPath).mtime
fileMtime = iwaMtime if iwaMtime > fileMtime
end
bndPath = path.sub(/\.view$|\.vew$|\.htm$|\.html$/,'.bnd')
if File.exist?(bndPath)
bndMtime = File.stat(bndPath).mtime
fileMtime = bndMtime if bndMtime > fileMtime
end
unless mtime and mtime >= fileMtime
mylog.info "Loading template #{path}"
reload file
@templateMTimes[path] = fileMtime
end
end
end