| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |