Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of directories in an efficient manner. Closes #16969.
This commit is contained in:
committed by
Dimitri Schoolwerth
parent
f0e098fa06
commit
aa5dbad410
@@ -52,7 +52,7 @@ enum
|
||||
wxFSW_EVENT_RENAME | wxFSW_EVENT_MODIFY |
|
||||
wxFSW_EVENT_ACCESS | wxFSW_EVENT_ATTRIB |
|
||||
wxFSW_EVENT_WARNING | wxFSW_EVENT_ERROR
|
||||
#ifdef wxHAS_INOTIFY
|
||||
#if defined(wxHAS_INOTIFY) || defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
|
||||
,wxFSW_EVENT_UNMOUNT = 0x2000
|
||||
#endif
|
||||
};
|
||||
@@ -395,6 +395,10 @@ protected:
|
||||
#ifdef wxHAS_INOTIFY
|
||||
#include "wx/unix/fswatcher_inotify.h"
|
||||
#define wxFileSystemWatcher wxInotifyFileSystemWatcher
|
||||
#elif defined(wxHAS_KQUEUE) && defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
|
||||
#include "wx/unix/fswatcher_kqueue.h"
|
||||
#include "wx/osx/fswatcher_fsevents.h"
|
||||
#define wxFileSystemWatcher wxFsEventsFileSystemWatcher
|
||||
#elif defined(wxHAS_KQUEUE)
|
||||
#include "wx/unix/fswatcher_kqueue.h"
|
||||
#define wxFileSystemWatcher wxKqueueFileSystemWatcher
|
||||
|
Reference in New Issue
Block a user