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 2e24122b60b619c7a72a3b85d36c509badf9469b..3ebaf4f077329a4162721d77933aa0a0b9ab7e88 100644 |
| --- a/runtime/bin/file_system_watcher_macos.cc |
| +++ b/runtime/bin/file_system_watcher_macos.cc |
| @@ -3,10 +3,10 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| #include "platform/globals.h" |
| -#if defined(TARGET_OS_MACOS) |
| - |
| #include "bin/file_system_watcher.h" |
| +#if defined(TARGET_OS_MACOS) && !defined(TARGET_OS_IOS) |
|
Ivan Posva
2015/06/09 21:20:03
This will not work on the regular Dart builds as t
|
| + |
| #include <errno.h> // NOLINT |
| #include <fcntl.h> // NOLINT |
| #include <unistd.h> // NOLINT |
| @@ -393,3 +393,43 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) { |
| } // namespace dart |
| #endif // defined(TARGET_OS_MACOS) |
| + |
| +#if defined(TARGET_OS_IOS) |
| + |
| +namespace dart { |
| +namespace bin { |
| + |
| +// FSEvents are unavailable on iOS. Stub out related methods |
| +Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) { |
| + return DartUtils::NewDartOSError(); |
| +} |
| + |
| +intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) { |
| + return -1; |
| +} |
| + |
| +bool FileSystemWatcher::IsSupported() { |
| + return false; |
| +} |
| + |
| +void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) { |
| +} |
| + |
| +intptr_t FileSystemWatcher::Init() { |
| + return -1; |
| +} |
| + |
| +void FileSystemWatcher::Close(intptr_t id) { |
| +} |
| + |
| +intptr_t FileSystemWatcher::WatchPath(intptr_t id, |
| + const char* path, |
| + int events, |
| + bool recursive) { |
| + return -1; |
| +} |
| + |
| +} // namespace bin |
| +} // namespace dart |
| + |
| +#endif // defined(TARGET_OS_IOS) |