如何获取修改文件Python Watchdog的可执行文件的详细信息

时间:2019-01-12 00:18:26

标签: python filesystems exe monitor python-watchdog

我正在尝试监视目录中的文件系统事件,该事件我知道如何使用python-watchdog来执行,但我似乎找不到找到修改文件的进程的方法。看门狗返回已修改的文件,但未返回修改的文件。 如果有不使用看门狗的解决方案,我很乐意以任何方式找到解决方案。

这里是一个例子:

class MyHandler(FileSystemEventHandler):
    def on_any_event(self, event):
        print(f'event type: {event.event_type}\npath: {event.src_path}\n')
        # These are the properties of an event that I know of. Is there perhaps a property that returns the modifier?

谢谢!

0 个答案:

没有答案