Raxol.Terminal.ScreenBuffer.FileWatcher (Raxol v0.5.0)
View SourceHandles file system event monitoring for the terminal screen buffer. This module provides functions for processing file system events and managing debounced event handling.
Summary
Functions
Cleans up the file watcher state. Returns a new file watcher state with all watched paths and pending events cleared.
Handles debounced file system events. Returns a new file watcher state with the events processed after the timeout.
Handles a file system event. Returns a new file watcher state with the event processed.
Initializes a new file watcher struct with default values.
Types
@type debounce_timeout() :: non_neg_integer()
@type events() :: [event()]
@type t() :: %Raxol.Terminal.ScreenBuffer.FileWatcher{ last_event_time: non_neg_integer(), pending_events: events(), watched_paths: MapSet.new(Path.t()) }
Functions
Cleans up the file watcher state. Returns a new file watcher state with all watched paths and pending events cleared.
@spec handle_debounced(t(), events(), debounce_timeout()) :: t()
Handles debounced file system events. Returns a new file watcher state with the events processed after the timeout.
Handles a file system event. Returns a new file watcher state with the event processed.
Initializes a new file watcher struct with default values.