def FSMonitor(self):
wm = WatchManager()
mask = IN_DELETE_SELF | IN_ACCESS
notifier = Notifier(wm,EventHandle())
while True:
try:
notifier.process_events()
wm.add_watch(usericonPath,mask,rec=True)
if notifier.check_events():
notifier.read_events()
except KeyboardInterrupt:
notifier.stop()
break
评论列表
文章目录