监听用户对资源管理器的操作
返回对象:wuChangeNotificationObject
注册文件监听窗口\监听用户对资源管理器的操作,
省略参数则创建 message only window
清空所有监视路径并停止监视目录,返回对象自身
返回对象:wuChangeNotificationObject
注销并关闭文件监听
wuChangeNotificationObject.onAssocChanged = function(srcPath,dstPath){
_/*文件关联被改变了*/
}
wuChangeNotificationObject.onAttributes = function(srcPath,dstPath){
/*文件属性被改变*/
}
wuChangeNotificationObject.onCreate = function(srcPath,dstPath){
/*文件夹的外壳成员创建了*/
}
wuChangeNotificationObject.onDelete = function(srcPath,dstPath){
/*非文件夹的外壳成员删除了*/
}
wuChangeNotificationObject.onDriveAdd = function(srcPath,dstPath){
/*添加了驱动器*/
}
wuChangeNotificationObject.onDriveAddGui = function(srcPath,dstPath){
/*通过外壳添加的驱动器*/
}
wuChangeNotificationObject.onDriveRemoved = function(srcPath,dstPath){
/*驱动器被删除了*/
}
wuChangeNotificationObject.onFreeSpace = function(srcPath,dstPath){
/*驱动器剩余空间数变化*/
}
wuChangeNotificationObject.onMakeDir = function(srcPath,dstPath){
/*目录被创建*/
}
wuChangeNotificationObject.onMediaInserted = function(srcPath,dstPath){
/*存储介质被插入*/
}
wuChangeNotificationObject.onMediaRemoved = function(srcPath,dstPath){
/*存储介质被删除*/
}
wuChangeNotificationObject.onNetShare = function(srcPath,dstPath){
/*本地的目录被共享*/
}
wuChangeNotificationObject.onNetShare = function(srcPath,dstPath){
/*本地的目录取消共享*/
}
wuChangeNotificationObject.onRemoveDir = function(srcPath,dstPath){
/*文件夹中的内容被改变*/
}
wuChangeNotificationObject.onRenameFolder = function(srcPath,dstPath){
/*文件夹名称被改变*/
}
wuChangeNotificationObject.onRenameItem = function(srcPath,dstPath){
/*非文件外壳对象名称被改变*/
}
wuChangeNotificationObject.onSeverDisconnect = function(srcPath,dstPath){
/*计算机被服务器断开*/
}
wuChangeNotificationObject.onUpdateDir = function(srcPath,dstPath){
/*文件夹中的内容被改变
此目录下的较多文件变更可能被合并为此事件*/
}
wuChangeNotificationObject.onUpdateImage = function(srcPath,dstPath){
/*系统图像列表中的图像被改变*/
}
wuChangeNotificationObject.onUpdateItem = function(srcPath,dstPath){
/*非文件夹外壳对象的名称被改变*/
}
注册并启用文件监视功能,
所有参数都可以省略,默认使用 _WM_USERDEF_FILECHANGED 消息
调用此函数以前,必须指定所有需要启用的事件回调函数
返回对象:wuChangeNotificationObject
添加监视路径,路径可以使用_CSIDL_开头的常量表示
参数2为可选参数,返回对象自身
_SHCNEE_MSI_CHANGE=4
_SHCNEE_MSI_UNINSTALL=5
_SHCNEE_ORDERCHANGED=2
_SHCNE_ALLEVENTS=0x7FFFFFFF
_SHCNE_ASSOCCHANGED=0x8000000
_SHCNE_ATTRIBUTES=0x800
_SHCNE_CREATE=2
_SHCNE_DELETE=4
_SHCNE_DISKEVENTS=0x2381F
_SHCNE_DRIVEADD=0x100
_SHCNE_DRIVEADDGUI=0x10000
_SHCNE_DRIVEREMOVED=0x80
_SHCNE_FREESPACE=0x40000
_SHCNE_GLOBALEVENTS=0xC0581E0
_SHCNE_INTERRUPT=0x80000000
_SHCNE_MEDIAINSERTED=0x20
_SHCNE_MEDIAREMOVED=0x40
_SHCNE_MKDIR=8
_SHCNE_NETSHARE=0x200
_SHCNE_NETUNSHARE=0x400
_SHCNE_RENAMEFOLDER=0x20000
_SHCNE_RENAMEITEM=1
_SHCNE_RMDIR=0x10
_SHCNE_SERVERDISCONNECT=0x4000
_SHCNE_UPDATEDIR=0x1000
_SHCNE_UPDATEIMAGE=0x8000
_SHCNE_UPDATEITEM=0x2000
_SHCNF_DWORD=3
_SHCNF_FLUSH=0x1000
_SHCNF_FLUSHNOWAIT=0x3000
_SHCNF_IDLIST=0
_SHCNF_NOTIFYRECURSIVE=0x10000
_SHCNF_PRINTER=2
_SHCNF_TYPE=0xFF
_SHCNF_srcPath=5
_SHCNRF_InterruptLevel=1
_SHCNRF_NewDelivery=0x8000
_SHCNRF_RecursiveInterrupt=0x1000
_SHCNRF_ShellLevel=2
_WM_USERDEF_FILECHANGED=0x8F00