class Middleman::CoreExtensions::FileWatcher::API

def find_new_files(path)

Returns:
  • (void) -

Parameters:
  • path (String) -- The path to reload
def find_new_files(path)
  relative_path = path.sub("#{@app.root}/", "")
  subset = @known_paths.select { |p| p.match(%r{^#{relative_path}}) }
  Find.find(path) do |file|
    next if File.directory?(file)
    relative_path = file.sub("#{@app.root}/", "")
    self.did_change(relative_path) unless subset.include?(relative_path)
  end if File.exists?(path)
end