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

Side by Side Diff: runtime/bin/file_impl.dart

Issue 9494004: Fix type warnings in dart:io library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/file.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class _FileInputStream extends _BaseDataInputStream implements InputStream { 5 class _FileInputStream extends _BaseDataInputStream implements InputStream {
6 _FileInputStream(String name) { 6 _FileInputStream(String name) {
7 _file = new File(name); 7 _file = new File(name);
8 _data = []; 8 _data = [];
9 _position = 0; 9 _position = 0;
10 _file.errorHandler = (String s) { 10 _file.errorHandler = (String s) {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 request[1] = _name; 411 request[1] = _name;
412 _fileService.call(request).receive((path, replyTo) { 412 _fileService.call(request).receive((path, replyTo) {
413 if (path != null) { 413 if (path != null) {
414 if (_directoryHandler != null) _directoryHandler(new Directory(path)); 414 if (_directoryHandler != null) _directoryHandler(new Directory(path));
415 } else if (_errorHandler != null) { 415 } else if (_errorHandler != null) {
416 _errorHandler("Cannot get directory for: ${_name}"); 416 _errorHandler("Cannot get directory for: ${_name}");
417 } 417 }
418 }); 418 });
419 } 419 }
420 420
421 void directorySync() { 421 Directory directorySync() {
422 if (_asyncUsed) { 422 if (_asyncUsed) {
423 throw new FileIOException( 423 throw new FileIOException(
424 "Mixed use of synchronous and asynchronous API"); 424 "Mixed use of synchronous and asynchronous API");
425 } 425 }
426 if (!existsSync()) { 426 if (!existsSync()) {
427 throw new FileIOException("Cannot get directory for: $_name"); 427 throw new FileIOException("Cannot get directory for: $_name");
428 } 428 }
429 return new Directory(_FileUtils.directory(_name)); 429 return new Directory(_FileUtils.directory(_name));
430 } 430 }
431 431
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 Function _readByteHandler; 1199 Function _readByteHandler;
1200 Function _readListHandler; 1200 Function _readListHandler;
1201 Function _noPendingWriteHandler; 1201 Function _noPendingWriteHandler;
1202 Function _positionHandler; 1202 Function _positionHandler;
1203 Function _setPositionHandler; 1203 Function _setPositionHandler;
1204 Function _truncateHandler; 1204 Function _truncateHandler;
1205 Function _lengthHandler; 1205 Function _lengthHandler;
1206 Function _flushHandler; 1206 Function _flushHandler;
1207 Function _errorHandler; 1207 Function _errorHandler;
1208 } 1208 }
OLDNEW
« no previous file with comments | « runtime/bin/file.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698