OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #if !defined(DART_IO_DISABLED) | 5 #if !defined(DART_IO_DISABLED) |
6 | 6 |
7 #include "platform/globals.h" | 7 #include "platform/globals.h" |
8 #if defined(TARGET_OS_MACOS) | 8 #if defined(HOST_OS_MACOS) |
9 | 9 |
10 #include "bin/file_system_watcher.h" | 10 #include "bin/file_system_watcher.h" |
11 | 11 |
12 #if !TARGET_OS_IOS | 12 #if !HOST_OS_IOS |
13 | 13 |
14 #include <errno.h> // NOLINT | 14 #include <errno.h> // NOLINT |
15 #include <fcntl.h> // NOLINT | 15 #include <fcntl.h> // NOLINT |
16 #include <unistd.h> // NOLINT | 16 #include <unistd.h> // NOLINT |
17 #include <CoreServices/CoreServices.h> // NOLINT | 17 #include <CoreServices/CoreServices.h> // NOLINT |
18 | 18 |
19 #include "bin/eventhandler.h" | 19 #include "bin/eventhandler.h" |
20 #include "bin/fdutils.h" | 20 #include "bin/fdutils.h" |
21 #include "bin/file.h" | 21 #include "bin/file.h" |
22 #include "bin/socket.h" | 22 #include "bin/socket.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 Dart_ListSetAt(event, 3, Dart_NewBoolean(true)); | 390 Dart_ListSetAt(event, 3, Dart_NewBoolean(true)); |
391 Dart_ListSetAt(event, 4, Dart_NewInteger(path_id)); | 391 Dart_ListSetAt(event, 4, Dart_NewInteger(path_id)); |
392 Dart_ListSetAt(events, i, event); | 392 Dart_ListSetAt(events, i, event); |
393 } | 393 } |
394 return events; | 394 return events; |
395 } | 395 } |
396 | 396 |
397 } // namespace bin | 397 } // namespace bin |
398 } // namespace dart | 398 } // namespace dart |
399 | 399 |
400 #else // !TARGET_OS_IOS | 400 #else // !HOST_OS_IOS |
401 | 401 |
402 namespace dart { | 402 namespace dart { |
403 namespace bin { | 403 namespace bin { |
404 | 404 |
405 // FSEvents are unavailable on iOS. Stub out related methods | 405 // FSEvents are unavailable on iOS. Stub out related methods |
406 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) { | 406 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) { |
407 return DartUtils::NewDartOSError(); | 407 return DartUtils::NewDartOSError(); |
408 } | 408 } |
409 | 409 |
410 | 410 |
(...skipping 21 matching lines...) Expand all Loading... |
432 intptr_t FileSystemWatcher::WatchPath(intptr_t id, | 432 intptr_t FileSystemWatcher::WatchPath(intptr_t id, |
433 const char* path, | 433 const char* path, |
434 int events, | 434 int events, |
435 bool recursive) { | 435 bool recursive) { |
436 return -1; | 436 return -1; |
437 } | 437 } |
438 | 438 |
439 } // namespace bin | 439 } // namespace bin |
440 } // namespace dart | 440 } // namespace dart |
441 | 441 |
442 #endif // !TARGET_OS_IOS | 442 #endif // !HOST_OS_IOS |
443 #endif // defined(TARGET_OS_MACOS) | 443 #endif // defined(HOST_OS_MACOS) |
444 | 444 |
445 #endif // !defined(DART_IO_DISABLED) | 445 #endif // !defined(DART_IO_DISABLED) |
OLD | NEW |