Inotify地址:访问
# -*- coding:utf-8 -*-
import os
import pyinotify
from functions import *
WATCH_PATH = '' #监控目录
if not WATCH_PATH:
wlog('Error',"The WATCH_PATH setting MUST be set.")
sys.exit()
else:
if os.path.exists(WATCH_PATH):
wlog('Watch
pyinotify库
支持的监控事件
cvar IN_ACCESS: File was accessed.
type IN_ACCESS: int
cvar IN_MODIFY: File was modified.
type IN_MODIFY: int
cvar IN_ATTRIB: Metadata changed.
type IN_ATTRIB: int
cvar IN_CLOSE_WRITE: Writtable file was closed.
type IN_CLOSE_WRIT