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

Side by Side Diff: sdk/lib/io/file_impl.dart

Issue 2705593002: Fix various nits in VM patch files. (Closed)
Patch Set: Address comments and issues found during testing. Created 3 years, 10 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 | « sdk/lib/internal/iterable.dart ('k') | sdk/lib/io/http.dart » ('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 part of dart.io; 5 part of dart.io;
6 6
7 // Read the file in blocks of size 64k. 7 // Read the file in blocks of size 64k.
8 const int _BLOCK_SIZE = 64 * 1024; 8 const int _BLOCK_SIZE = 64 * 1024;
9 9
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 openFailed(e, s); 165 openFailed(e, s);
166 } 166 }
167 } 167 }
168 } 168 }
169 } 169 }
170 170
171 class _FileStreamConsumer extends StreamConsumer<List<int>> { 171 class _FileStreamConsumer extends StreamConsumer<List<int>> {
172 File _file; 172 File _file;
173 Future<RandomAccessFile> _openFuture; 173 Future<RandomAccessFile> _openFuture;
174 174
175 _FileStreamConsumer(File this._file, FileMode mode) { 175 _FileStreamConsumer(this._file, FileMode mode) {
176 _openFuture = _file.open(mode: mode); 176 _openFuture = _file.open(mode: mode);
177 } 177 }
178 178
179 _FileStreamConsumer.fromStdio(int fd) { 179 _FileStreamConsumer.fromStdio(int fd) {
180 assert(1 <= fd && fd <= 2); 180 assert(1 <= fd && fd <= 2);
181 _openFuture = new Future.value(_File._openStdioSync(fd)); 181 _openFuture = new Future.value(_File._openStdioSync(fd));
182 } 182 }
183 183
184 Future<File> addStream(Stream<List<int>> stream) { 184 Future<File> addStream(Stream<List<int>> stream) {
185 Completer<File> completer = new Completer<File>.sync(); 185 Completer<File> completer = new Completer<File>.sync();
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 void _checkAvailable() { 1091 void _checkAvailable() {
1092 if (_asyncDispatched) { 1092 if (_asyncDispatched) {
1093 throw new FileSystemException("An async operation is currently pending", 1093 throw new FileSystemException("An async operation is currently pending",
1094 path); 1094 path);
1095 } 1095 }
1096 if (closed) { 1096 if (closed) {
1097 throw new FileSystemException("File closed", path); 1097 throw new FileSystemException("File closed", path);
1098 } 1098 }
1099 } 1099 }
1100 } 1100 }
OLDNEW
« no previous file with comments | « sdk/lib/internal/iterable.dart ('k') | sdk/lib/io/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698