使用文件观察者获取通知 [英] Get notification using file observer

查看:147
本文介绍了使用文件观察者获取通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的文件观察得到notification.But我得到通知,该文件已被删除了。是否可以删除文件前通知?

I am using File Observer to get notification.But I get notification after the file has deleted . Is it possible to notify before file deletion ?

推荐答案

没有,它不是。观察员只会告诉你什么是已经发生了。拦截删除它发生之前的唯一方法是写无论是设备驱动程序的启动与删除的文件的程序,系统或者C库上加载。

No, it's not. The observer will simply tell you what's already happened. The only way to intercept the deletion before it happens is to write either a device driver to be loaded on the system or a C library that's started with the program that's deleting the file.

这篇关于使用文件观察者获取通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆