Method: Listen::Directory#scan

Defined in:
lib/listen/directory.rb

#scanObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/listen/directory.rb', line 11

def scan
  _update_record
  _all_entries.each do |entry_path, data|
    case data[:type]
    when 'File'
      _async_change(entry_path, options.merge(type: 'File'))
    when 'Dir'
      _async_change(entry_path, options.merge(type: 'Dir')) if _recursive_scan?(entry_path)
    end
  end
end