lst_auto_rta.files_callback.QueueingFilePatternMatchingEventHandler¶
- class lst_auto_rta.files_callback.QueueingFilePatternMatchingEventHandler(file_queue: Queue, **kwargs)[source]¶
Bases:
PatternMatchingEventHandler
Handler that queues (blocking) the file paths of created files that matched the patterns
- Parameters:
file_queue (Queue) – The queue to use to queue the files created.
Methods
__init__
(file_queue, **kwargs)dispatch
(event)Dispatches events to the appropriate methods.
on_any_event
(event)Catch-all event handler.
on_closed
(event)Called when a file opened for writing is closed.
on_closed_no_write
(event)Called when a file opened for reading is closed.
on_created
(event)Called when a file or directory is created.
on_deleted
(event)Called when a file or directory is deleted.
on_modified
(event)Called when a file or directory is modified.
on_moved
(event)Called when a file or a directory is moved or renamed.
on_opened
(event)Called when a file is opened.
Attributes
(Read-only)
True
if path names should be matched sensitive to case;False
otherwise.(Read-only)
True
if directories should be ignored;False
otherwise.(Read-only) Patterns to ignore matching event paths.
(Read-only) Patterns to allow matching event paths.
- property case_sensitive: bool¶
(Read-only)
True
if path names should be matched sensitive to case;False
otherwise.
- dispatch(event: FileSystemEvent) None ¶
Dispatches events to the appropriate methods.
- Parameters:
event (
FileSystemEvent
) – The event object representing the file system event.
- property ignore_directories: bool¶
(Read-only)
True
if directories should be ignored;False
otherwise.
- property ignore_patterns: list[str] | None¶
(Read-only) Patterns to ignore matching event paths.
- on_any_event(event: FileSystemEvent) None ¶
Catch-all event handler.
- Parameters:
event (
FileSystemEvent
) – The event object representing the file system event.
- on_closed(event: FileClosedEvent) None ¶
Called when a file opened for writing is closed.
- Parameters:
event (
FileClosedEvent
) – Event representing file closing.
- on_closed_no_write(event: FileClosedNoWriteEvent) None ¶
Called when a file opened for reading is closed.
- Parameters:
event (
FileClosedNoWriteEvent
) – Event representing file closing.
- on_created(event: FileSystemEvent) None [source]¶
Called when a file or directory is created.
- Parameters:
event (
DirCreatedEvent
orFileCreatedEvent
) – Event representing file/directory creation.
- on_deleted(event: DirDeletedEvent | FileDeletedEvent) None ¶
Called when a file or directory is deleted.
- Parameters:
event (
DirDeletedEvent
orFileDeletedEvent
) – Event representing file/directory deletion.
- on_modified(event: DirModifiedEvent | FileModifiedEvent) None ¶
Called when a file or directory is modified.
- Parameters:
event (
DirModifiedEvent
orFileModifiedEvent
) – Event representing file/directory modification.
- on_moved(event: DirMovedEvent | FileMovedEvent) None ¶
Called when a file or a directory is moved or renamed.
- Parameters:
event (
DirMovedEvent
orFileMovedEvent
) – Event representing file/directory movement.
- on_opened(event: FileOpenedEvent) None ¶
Called when a file is opened.
- Parameters:
event (
FileOpenedEvent
) – Event representing file opening.
- property patterns: list[str] | None¶
(Read-only) Patterns to allow matching event paths.