Class: Listen::Record::SymlinkDetector

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

Constant Summary collapse

README_URL =
'https://github.com/guard/listen/blob/master/README.md'
"  ** ERROR: directory is already being watched! **\n\n  Directory: %s\n\n  is already being watched through: %s\n\n  MORE INFO: \#{README_URL}\n"
Error =

for backward compatibility

::Listen::Error

Instance Method Summary collapse

Constructor Details

#initializeSymlinkDetector

Returns a new instance of SymlinkDetector.



24
25
26
# File 'lib/listen/record/symlink_detector.rb', line 24

def initialize
  @real_dirs = Set.new
end

Instance Method Details

#verify_unwatched!(entry) ⇒ Object



28
29
30
31
# File 'lib/listen/record/symlink_detector.rb', line 28

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

#warn(message) ⇒ Object

Leaving this stub here since some warning work-arounds were referring to it. Deprecated. Will be removed in Listen v4.0.



35
36
37
# File 'lib/listen/record/symlink_detector.rb', line 35

def warn(message)
  Listen.adapter_warn(message)
end