Class: Listen::Record::SymlinkDetector
- Inherits:
-
Object
- Object
- Listen::Record::SymlinkDetector
- 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'
- SYMLINK_LOOP_ERROR =
<<-EOS ** ERROR: directory is already being watched! ** Directory: %s is already being watched through: %s MORE INFO: #{WIKI} EOS
Instance Method Summary collapse
-
#initialize ⇒ SymlinkDetector
constructor
A new instance of SymlinkDetector.
- #verify_unwatched!(entry) ⇒ Object
Constructor Details
#initialize ⇒ SymlinkDetector
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) || _fail(entry.sys_path, real_path) end |