Skip to content

适配watchdog后监控不再递归目录 #5

@lbcnp

Description

@lbcnp

fileMonitor.py文件引入watchdog库后,只监控当前指定的目录下变化。
watchdog库中的Observer默认只监控指定目录,而不会自动递归到子目录。添加参数recursive=True达到监控子目录的变化。

Fix:
observer.schedule(event_handler, spyDir)
修改为
observer.schedule(event_handler, spyDir, recursive=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions