| 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 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "bin/file_system_watcher.h" | 8 #include "bin/file_system_watcher.h" |
| 9 #include "bin/eventhandler.h" | 9 #include "bin/eventhandler.h" |
| 10 | 10 |
| 11 #include <WinIoCtl.h> // NOLINT | 11 #include <WinIoCtl.h> // NOLINT |
| 12 | 12 |
| 13 #include "bin/builtin.h" | 13 #include "bin/builtin.h" |
| 14 #include "bin/log.h" | 14 #include "bin/log.h" |
| 15 #include "bin/utils.h" | 15 #include "bin/utils.h" |
| 16 | 16 |
| 17 | 17 |
| 18 namespace dart { | 18 namespace dart { |
| 19 namespace bin { | 19 namespace bin { |
| 20 | 20 |
| 21 bool FileSystemWatcher::IsSupported() { |
| 22 return true; |
| 23 } |
| 24 |
| 25 |
| 21 intptr_t FileSystemWatcher::WatchPath(const char* path, | 26 intptr_t FileSystemWatcher::WatchPath(const char* path, |
| 22 int events, | 27 int events, |
| 23 bool recursive) { | 28 bool recursive) { |
| 24 const wchar_t* name = StringUtils::Utf8ToWide(path); | 29 const wchar_t* name = StringUtils::Utf8ToWide(path); |
| 25 HANDLE dir = CreateFileW(name, | 30 HANDLE dir = CreateFileW(name, |
| 26 FILE_LIST_DIRECTORY, | 31 FILE_LIST_DIRECTORY, |
| 27 FILE_SHARE_READ | | 32 FILE_SHARE_READ | |
| 28 FILE_SHARE_WRITE | | 33 FILE_SHARE_WRITE | |
| 29 FILE_SHARE_DELETE, | 34 FILE_SHARE_DELETE, |
| 30 NULL, | 35 NULL, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 offset += e->NextEntryOffset; | 97 offset += e->NextEntryOffset; |
| 93 } | 98 } |
| 94 delete[] buffer; | 99 delete[] buffer; |
| 95 return events; | 100 return events; |
| 96 } | 101 } |
| 97 | 102 |
| 98 } // namespace bin | 103 } // namespace bin |
| 99 } // namespace dart | 104 } // namespace dart |
| 100 | 105 |
| 101 #endif // defined(TARGET_OS_WINDOWS) | 106 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |