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

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

Issue 190723008: Fix type error in implementation of dart:io Directory.existsSync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 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 | « sdk/lib/_internal/lib/io_patch.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 part of dart.io; 5 part of dart.io;
6 6
7 class _Directory extends FileSystemEntity implements Directory { 7 class _Directory extends FileSystemEntity implements Directory {
8 final String path; 8 final String path;
9 9
10 _Directory(this.path) { 10 _Directory(this.path) {
11 if (path is! String) { 11 if (path is! String) {
12 throw new ArgumentError('${Error.safeToString(path)} ' 12 throw new ArgumentError('${Error.safeToString(path)} '
13 'is not a String'); 13 'is not a String');
14 } 14 }
15 } 15 }
16 16
17 external static _current(); 17 external static _current();
18 external static _setCurrent(path); 18 external static _setCurrent(path);
19 external static _createTemp(String path); 19 external static _createTemp(String path);
20 external static String _systemTemp(); 20 external static String _systemTemp();
21 external static int _exists(String path); 21 external static _exists(String path);
22 external static _create(String path); 22 external static _create(String path);
23 external static _deleteNative(String path, bool recursive); 23 external static _deleteNative(String path, bool recursive);
24 external static _rename(String path, String newPath); 24 external static _rename(String path, String newPath);
25 external static List _list(String path, bool recursive, bool followLinks); 25 external static List _list(String path, bool recursive, bool followLinks);
26 26
27 static Directory get current { 27 static Directory get current {
28 var result = _current(); 28 var result = _current();
29 if (result is OSError) { 29 if (result is OSError) {
30 throw new FileSystemException( 30 throw new FileSystemException(
31 "Getting current working directory failed", "", result); 31 "Getting current working directory failed", "", result);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 controller.addError( 377 controller.addError(
378 new FileSystemException("Directory listing failed", 378 new FileSystemException("Directory listing failed",
379 errorPath, 379 errorPath,
380 err)); 380 err));
381 } else { 381 } else {
382 controller.addError( 382 controller.addError(
383 new FileSystemException("Internal error")); 383 new FileSystemException("Internal error"));
384 } 384 }
385 } 385 }
386 } 386 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/io_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698