4

Python 每日一练: watchdog 文件目录事件监控

 2 years ago
source link: https://www.v2ex.com/t/879888
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Python

Python 每日一练: watchdog 文件目录事件监控

  ppj · 1 小时 51 分钟前 · 266 次点击

监控指定目录下的文件或文件夹的变动

watchdog 是一款小软件,可以监控文件和目录是否发生变化,watchdog 就是一款可以监控文件系统变化的第三方模块,当被监视的区域发生文件或目录的创建,修改,或者删除时,就可以引发特定的事件,我们只需要编写针对这些事件的函数即可处理这些变化。

代码请点击 => 代码


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK