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

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

Issue 12425004: Fix deprecation warnings in dart:io. Now completely warning free. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/io/common.dart ('k') | sdk/lib/io/file.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 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * [Directory] objects are used for working with directories. 8 * [Directory] objects are used for working with directories.
9 */ 9 */
10 abstract class Directory extends FileSystemEntity { 10 abstract class Directory extends FileSystemEntity {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 final String path; 159 final String path;
160 } 160 }
161 161
162 162
163 class DirectoryIOException implements Exception { 163 class DirectoryIOException implements Exception {
164 const DirectoryIOException([String this.message = "", 164 const DirectoryIOException([String this.message = "",
165 String this.path = "", 165 String this.path = "",
166 OSError this.osError = null]); 166 OSError this.osError = null]);
167 String toString() { 167 String toString() {
168 StringBuffer sb = new StringBuffer(); 168 StringBuffer sb = new StringBuffer();
169 sb.add("DirectoryIOException"); 169 sb.write("DirectoryIOException");
170 if (!message.isEmpty) { 170 if (!message.isEmpty) {
171 sb.add(": $message"); 171 sb.write(": $message");
172 if (path != null) { 172 if (path != null) {
173 sb.add(", path = $path"); 173 sb.write(", path = $path");
174 } 174 }
175 if (osError != null) { 175 if (osError != null) {
176 sb.add(" ($osError)"); 176 sb.write(" ($osError)");
177 } 177 }
178 } else if (osError != null) { 178 } else if (osError != null) {
179 sb.add(": $osError"); 179 sb.write(": $osError");
180 if (path != null) { 180 if (path != null) {
181 sb.add(", path = $path"); 181 sb.write(", path = $path");
182 } 182 }
183 } 183 }
184 return sb.toString(); 184 return sb.toString();
185 } 185 }
186 final String message; 186 final String message;
187 final String path; 187 final String path;
188 final OSError osError; 188 final OSError osError;
189 } 189 }
OLDNEW
« no previous file with comments | « sdk/lib/io/common.dart ('k') | sdk/lib/io/file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698