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
FileEventIn
instance that generated the message
matches
matches(
type: None | Container[FileEvent] | FileEvent | str = None,
path: None | Container[pathlib.Path] | pathlib.Path = None,
) -> bool
Checks if message's attributes match all provided attribute conditions:
-
If condition is
None
or omitted, it matches anything. -
If condition equals attribute, it matches the attribute.
-
If condition is a container and contains the attribute, it matches the attribute.
Use Not(condition)
to invert condition matching.
Returns:
-
bool
–True
if all attributes match,False
if any does not match