container_notifier.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:docker-windows-volume-watcher 作者: merofeev 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号