Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: runtime/bin/file_system_watcher_win.cc

Issue 3001963002: [dart:io] Namespaces for file IO (Closed)
Patch Set: Fuchsia fix Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/file_system_watcher_macos.cc ('k') | runtime/bin/file_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(HOST_OS_WINDOWS) 6 #if defined(HOST_OS_WINDOWS)
7 7
8 #include "bin/file_system_watcher.h" 8 #include "bin/file_system_watcher.h"
9 9
10 #include <WinIoCtl.h> // NOLINT 10 #include <WinIoCtl.h> // NOLINT
(...skipping 13 matching lines...) Expand all
24 24
25 intptr_t FileSystemWatcher::Init() { 25 intptr_t FileSystemWatcher::Init() {
26 return 0; 26 return 0;
27 } 27 }
28 28
29 void FileSystemWatcher::Close(intptr_t id) { 29 void FileSystemWatcher::Close(intptr_t id) {
30 USE(id); 30 USE(id);
31 } 31 }
32 32
33 intptr_t FileSystemWatcher::WatchPath(intptr_t id, 33 intptr_t FileSystemWatcher::WatchPath(intptr_t id,
34 Namespace* namespc,
34 const char* path, 35 const char* path,
35 int events, 36 int events,
36 bool recursive) { 37 bool recursive) {
37 USE(id); 38 USE(id);
38 Utf8ToWideScope name(path); 39 Utf8ToWideScope name(path);
39 HANDLE dir = CreateFileW( 40 HANDLE dir = CreateFileW(
40 name.wide(), FILE_LIST_DIRECTORY, 41 name.wide(), FILE_LIST_DIRECTORY,
41 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, 42 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL,
42 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL); 43 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL);
43 44
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 123 }
123 offset += e->NextEntryOffset; 124 offset += e->NextEntryOffset;
124 } 125 }
125 return events; 126 return events;
126 } 127 }
127 128
128 } // namespace bin 129 } // namespace bin
129 } // namespace dart 130 } // namespace dart
130 131
131 #endif // defined(HOST_OS_WINDOWS) 132 #endif // defined(HOST_OS_WINDOWS)
OLDNEW
« no previous file with comments | « runtime/bin/file_system_watcher_macos.cc ('k') | runtime/bin/file_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698