def __init__(self, container, host_dir, container_dir):
"""
Initialize a new instance of ContainerNotifier
Args:
container: Container
host_dir (str): Host directory
container_dir (str): Container directory
"""
self.container = container
self.host_dir = host_dir
self.container_dir = container_dir
event_handler = PatternMatchingEventHandler(ignore_directories=False)
handler = self.__change_handler
event_handler.on_created = handler
event_handler.on_moved = handler
event_handler.on_modified = handler
self.observer = Observer()
self.observer.schedule(event_handler, host_dir, recursive=True)
self.observer.start()
container_notifier.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录