A comprehensive collection of reusable TUI components for ratatui including resizable splits, tree views, markdown rendering, toast notifications, dialogs, and terminal embedding
//! Get paths that have changed.
usestd::path::PathBuf;usecrate::services::file_watcher::FileWatcher;implFileWatcher{/// Get the paths that have changed since the last call.
////// This returns and clears the internal list of changed paths.
/// Call [`check_for_changes`](Self::check_for_changes) first to
/// populate this list.
////// # Returns
////// A vector of paths that have changed.
////// # Example
////// ```no_run
/// use ratatui_toolkit::services::file_watcher::FileWatcher;
/// use std::path::Path;
////// let mut watcher = FileWatcher::for_directory().unwrap();
/// watcher.watch(Path::new("./src")).unwrap();
////// // In your event loop:
/// if watcher.check_for_changes() {
/// for path in watcher.get_changed_paths() {
/// println!("Changed: {}", path.display());
/// }
/// }
/// ```
pubfnget_changed_paths(&mutself)->Vec<PathBuf>{std::mem::take(&mutself.changed_paths)}/// Peek at the changed paths without clearing them.
////// Unlike [`get_changed_paths`](Self::get_changed_paths), this does
/// not clear the internal list.
////// # Returns
////// A slice of paths that have changed.
pubfnpeek_changed_paths(&self)->&[PathBuf]{&self.changed_paths
}}