Class: Listen::Record::SymlinkDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/listen/record/symlink_detector.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

WIKI =
'https://github.com/guard/listen/wiki/Duplicate-directory-errors'.freeze
"  ** ERROR: directory is already being watched! **\n\n  Directory: %s\n\n  is already being watched through: %s\n\n  MORE INFO: \#{WIKI}\n".freeze

Instance Method Summary collapse

Constructor Details

#initializeSymlinkDetector



22
23
24
# File 'lib/listen/record/symlink_detector.rb', line 22

def initialize
  @real_dirs = Set.new
end

Instance Method Details

#verify_unwatched!(entry) ⇒ Object



26
27
28
29
# File 'lib/listen/record/symlink_detector.rb', line 26

def verify_unwatched!(entry)
  real_path = entry.real_path
  @real_dirs.add?(real_path) || _fail(entry.sys_path, real_path)
end