Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: runtime/bin/file_system_watcher_macos.cc

Issue 23483030: Make file system watcher compile on Mac OS 106, and add a runtime-call to test if the system suppor… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file_system_watcher_linux.cc ('k') | runtime/bin/file_system_watcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_macos.cc
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index c06572f30e8e066507b2b3228e50341c8c1f24d7..b694bfddfd174478dc3ae1f024cd434c65d04e57 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -18,6 +18,26 @@
#include "bin/thread.h"
+#ifndef MAC_OS_X_VERSION_10_7
+enum {
+ kFSEventStreamCreateFlagFileEvents = 0x00000010
+};
+enum {
+ kFSEventStreamEventFlagItemCreated = 0x00000100,
+ kFSEventStreamEventFlagItemRemoved = 0x00000200,
+ kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400,
+ kFSEventStreamEventFlagItemRenamed = 0x00000800,
+ kFSEventStreamEventFlagItemModified = 0x00001000,
+ kFSEventStreamEventFlagItemFinderInfoMod = 0x00002000,
+ kFSEventStreamEventFlagItemChangeOwner = 0x00004000,
+ kFSEventStreamEventFlagItemXattrMod = 0x00008000,
+ kFSEventStreamEventFlagItemIsFile = 0x00010000,
+ kFSEventStreamEventFlagItemIsDir = 0x00020000,
+ kFSEventStreamEventFlagItemIsSymlink = 0x00040000
+};
+#endif
+
+
namespace dart {
namespace bin {
@@ -191,6 +211,12 @@ class FSEventsWatcher {
};
+#define kCFCoreFoundationVersionNumber10_7 635.00
+bool FileSystemWatcher::IsSupported() {
+ return kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_7;
+}
+
+
intptr_t FileSystemWatcher::WatchPath(const char* path,
int events,
bool recursive) {
« no previous file with comments | « runtime/bin/file_system_watcher_linux.cc ('k') | runtime/bin/file_system_watcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698