Message
FileEvent
Bases: AttrEnum
File event message type enumerator
to use as FileEventMsg type attribute
MOVED = 'MOVED'
DELETED = 'DELETED'
CREATED = 'CREATED'
MODIFIED = 'MODIFIED'
CLOSED = 'CLOSED'
OPENED = 'OPENED'
FileEventMsg
Bases: Msg
Parameters:
-
type(FileEvent | str) –File event type
-
path(Path) –File path
-
source(None | FileEventIn, default:None) –The
FileEventIninstance that generated the message
matches
matches(
type: None | Container[FileEvent] | FileEvent | str = None,
path: None | Container[Path] | Path = None,
) -> bool
Checks if message's attributes match all provided attribute conditions:
-
If condition is
Noneor omitted, it matches anything. -
If condition equals attribute, it matches the attribute.
-
If condition is a container (list, tuple) and contains the attribute, it matches the attribute.
Use Not(condition) to invert condition matching.
Returns:
-
bool–Trueif all attributes match,Falseif any does not match