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

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

Issue 10173024: Change the error handling in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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/chunked_stream.dart ('k') | runtime/bin/directory_impl.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) 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 /** 5 /**
6 * [Directory] objects are used for working with directories. 6 * [Directory] objects are used for working with directories.
7 */ 7 */
8 interface Directory default _Directory { 8 interface Directory default _Directory {
9 /** 9 /**
10 * Creates a directory object. The path is either a full path or 10 * Creates a directory object. The path is either a full path or
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 * Set the handler that is called when a directory listing is 128 * Set the handler that is called when a directory listing is
129 * done. The handler is called with an indication of whether or not 129 * done. The handler is called with an indication of whether or not
130 * the listing operation completed. 130 * the listing operation completed.
131 */ 131 */
132 void set onDone(void onDone(bool completed)); 132 void set onDone(void onDone(bool completed));
133 133
134 /** 134 /**
135 * Sets the handler that is called if there is an error while listing 135 * Sets the handler that is called if there is an error while listing
136 * or creating directories. 136 * or creating directories.
137 */ 137 */
138 void set onError(void onError(Exception e)); 138 void set onError(void onError(e));
139 139
140 /** 140 /**
141 * Gets the path of this directory. 141 * Gets the path of this directory.
142 */ 142 */
143 final String path; 143 final String path;
144 } 144 }
145 145
146 146
147 class DirectoryIOException implements Exception { 147 class DirectoryIOException implements Exception {
148 const DirectoryIOException([String this.message = "", 148 const DirectoryIOException([String this.message = "",
(...skipping 15 matching lines...) Expand all
164 if (path != null) { 164 if (path != null) {
165 sb.add(", path = $path"); 165 sb.add(", path = $path");
166 } 166 }
167 } 167 }
168 return sb.toString(); 168 return sb.toString();
169 } 169 }
170 final String message; 170 final String message;
171 final String path; 171 final String path;
172 final OSError osError; 172 final OSError osError;
173 } 173 }
OLDNEW
« no previous file with comments | « runtime/bin/chunked_stream.dart ('k') | runtime/bin/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698