MCPcopy
hub / github.com/Textualize/toolong / add

Method add

src/toolong/watcher.py:77–85  ·  view source on GitHub ↗

Add a file to the watcher.

(
        self,
        log_file: LogFile,
        callback: Callable[[int, list[int]], None],
        error_callback: Callable[[Exception], None],
    )

Source from the content-addressed store, hash-verified

75 self._thread.start()
76
77 def add(
78 self,
79 log_file: LogFile,
80 callback: Callable[[int, list[int]], None],
81 error_callback: Callable[[Exception], None],
82 ) -> None:
83 """Add a file to the watcher."""
84 fileno = log_file.fileno
85 self._file_descriptors[fileno] = WatchedFile(log_file, callback, error_callback)
86
87 @abstractmethod
88 def run(self) -> None:

Callers 2

request_lineMethod · 0.45
start_tailMethod · 0.45

Calls 1

WatchedFileClass · 0.85

Tested by

no test coverage detected