class
LuneCLI::FileWatcher
- LuneCLI::FileWatcher
- Reference
- Object
Defined in:
lune_cli/file_watcher.crConstructors
Instance Method Summary
- #changed?(before : Hash(String, Time), after : Hash(String, Time)) : Bool
- #collect_mtimes(dir : String) : Hash(String, Time)
- #debounce : Time::Span
- #poll_interval : Time::Span
- #wait_for_change(src_dir : String) : Nil
-
#watch(process : Process, src_dir : String) : Bool
Blocks until a .cr file in src_dir changes or the process exits.
Constructor Detail
def self.new(poll_interval : Time::Span = 500.milliseconds, debounce : Time::Span = 200.milliseconds)
#
Instance Method Detail
def watch(process : Process, src_dir : String) : Bool
#
Blocks until a .cr file in src_dir changes or the process exits. Returns true if a change was detected (caller should restart), false if the process exited on its own.