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 { | 10 abstract class Directory { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 /** | 133 /** |
134 * List the sub-directories and files of this | 134 * List the sub-directories and files of this |
135 * [Directory]. Optionally recurse into sub-directories. Returns a | 135 * [Directory]. Optionally recurse into sub-directories. Returns a |
136 * [DirectoryLister] object representing the active listing | 136 * [DirectoryLister] object representing the active listing |
137 * operation. Handlers for files and directories should be | 137 * operation. Handlers for files and directories should be |
138 * registered on this DirectoryLister object. | 138 * registered on this DirectoryLister object. |
139 */ | 139 */ |
140 DirectoryLister list({bool recursive: false}); | 140 DirectoryLister list({bool recursive: false}); |
141 | 141 |
142 /** | 142 /** |
| 143 * List the sub-directories and files of this |
| 144 * [Directory]. Optionally recurse into sub-directories. Returns a |
| 145 * List containing Directory and File objects. |
| 146 */ |
| 147 List listSync({bool recursive: false}); |
| 148 |
| 149 /** |
143 * Returns a human readable string for this Directory instance. | 150 * Returns a human readable string for this Directory instance. |
144 */ | 151 */ |
145 String toString(); | 152 String toString(); |
146 | 153 |
147 /** | 154 /** |
148 * Gets the path of this directory. | 155 * Gets the path of this directory. |
149 */ | 156 */ |
150 final String path; | 157 final String path; |
151 } | 158 } |
152 | 159 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 if (path != null) { | 221 if (path != null) { |
215 sb.add(", path = $path"); | 222 sb.add(", path = $path"); |
216 } | 223 } |
217 } | 224 } |
218 return sb.toString(); | 225 return sb.toString(); |
219 } | 226 } |
220 final String message; | 227 final String message; |
221 final String path; | 228 final String path; |
222 final OSError osError; | 229 final OSError osError; |
223 } | 230 } |
OLD | NEW |