Protocol
provide.foundation.file.operations.detectors.protocol
¶
Protocol definitions for file operation detectors.
Classes¶
DetectorFunc
¶
Bases: Protocol
Protocol for file operation detector functions.
A detector function analyzes a list of file events and attempts to identify a specific file operation pattern (atomic save, batch update, etc.).
Returns None if the pattern is not detected, or a FileOperation with confidence score if the pattern matches.
Functions¶
__call__
¶
Detect file operation pattern from events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
events
|
list[FileEvent]
|
List of file events to analyze |
required |
Returns:
| Type | Description |
|---|---|
FileOperation | None
|
FileOperation if pattern detected, None otherwise |