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:
Roberto Perpuly
2015-06-06 01:28:30 +04:00
committed by Dimitri Schoolwerth
parent f0e098fa06
commit aa5dbad410
14 changed files with 700 additions and 36 deletions

View File

@@ -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