| 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_WINDOWS) | 8 #if defined(TARGET_OS_WINDOWS) |
| 9 | 9 |
| 10 #include "bin/file_system_watcher.h" | 10 #include "bin/file_system_watcher.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 void FileSystemWatcher::Close(intptr_t id) { | 33 void FileSystemWatcher::Close(intptr_t id) { |
| 34 USE(id); | 34 USE(id); |
| 35 } | 35 } |
| 36 | 36 |
| 37 | 37 |
| 38 intptr_t FileSystemWatcher::WatchPath(intptr_t id, | 38 intptr_t FileSystemWatcher::WatchPath(intptr_t id, |
| 39 const char* path, | 39 const char* path, |
| 40 int events, | 40 int events, |
| 41 bool recursive) { | 41 bool recursive) { |
| 42 USE(id); | 42 USE(id); |
| 43 const wchar_t* name = StringUtilsWin::Utf8ToWide(path); | 43 Utf8ToWideScope name(path); |
| 44 HANDLE dir = CreateFileW(name, | 44 HANDLE dir = CreateFileW(name.wide(), |
| 45 FILE_LIST_DIRECTORY, | 45 FILE_LIST_DIRECTORY, |
| 46 FILE_SHARE_READ | | 46 FILE_SHARE_READ | |
| 47 FILE_SHARE_WRITE | | 47 FILE_SHARE_WRITE | |
| 48 FILE_SHARE_DELETE, | 48 FILE_SHARE_DELETE, |
| 49 NULL, | 49 NULL, |
| 50 OPEN_EXISTING, | 50 OPEN_EXISTING, |
| 51 FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, | 51 FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, |
| 52 NULL); | 52 NULL); |
| 53 | 53 |
| 54 if (dir == INVALID_HANDLE_VALUE) { | 54 if (dir == INVALID_HANDLE_VALUE) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 136 } |
| 137 return events; | 137 return events; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace bin | 140 } // namespace bin |
| 141 } // namespace dart | 141 } // namespace dart |
| 142 | 142 |
| 143 #endif // defined(TARGET_OS_WINDOWS) | 143 #endif // defined(TARGET_OS_WINDOWS) |
| 144 | 144 |
| 145 #endif // !defined(DART_IO_DISABLED) | 145 #endif // !defined(DART_IO_DISABLED) |
| OLD | NEW |