Chromium Code Reviews| 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..7140b3fb416b2d148f6f51574528e32a248109d4 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,13 @@ class FSEventsWatcher { |
| }; |
| +bool FileSystemWatcher::IsSupported() { |
| + SInt32 version = 0; |
| + Gestalt(gestaltSystemVersion, &version); |
|
kustermann
2013/09/03 15:18:58
Seems like 'Gestalt' is deprecated / will be remov
Anders Johnsen
2013/09/03 15:32:56
Nicely spotted, changed.
|
| + return version >= 0x1070; |
| +} |
| + |
| + |
| intptr_t FileSystemWatcher::WatchPath(const char* path, |
| int events, |
| bool recursive) { |