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 * A reference to a directory (or _folder_) on the file system. | 8 * A reference to a directory (or _folder_) on the file system. |
9 * | 9 * |
10 * A Directory instance is an object holding a [path] on which operations can | 10 * A Directory instance is an object holding a [path] on which operations can |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 * their type, and links to directories are recursed into. | 273 * their type, and links to directories are recursed into. |
274 * Broken links are reported as [Link] objects. | 274 * Broken links are reported as [Link] objects. |
275 * If a symbolic link makes a loop in the file system, then a recursive | 275 * If a symbolic link makes a loop in the file system, then a recursive |
276 * listing will not follow a link twice in the | 276 * listing will not follow a link twice in the |
277 * same recursive descent, but will report it as a [Link] | 277 * same recursive descent, but will report it as a [Link] |
278 * the second time it is seen. | 278 * the second time it is seen. |
279 * | 279 * |
280 * The result is a stream of [FileSystemEntity] objects | 280 * The result is a stream of [FileSystemEntity] objects |
281 * for the directories, files, and links. | 281 * for the directories, files, and links. |
282 */ | 282 */ |
283 Stream<FileSystemEntity> list({bool recursive: false, | 283 Stream<FileSystemEntity> list( |
284 bool followLinks: true}); | 284 {bool recursive: false, bool followLinks: true}); |
285 | 285 |
286 /** | 286 /** |
287 * Lists the sub-directories and files of this [Directory]. | 287 * Lists the sub-directories and files of this [Directory]. |
288 * Optionally recurses into sub-directories. | 288 * Optionally recurses into sub-directories. |
289 * | 289 * |
290 * If [followLinks] is false, then any symbolic links found | 290 * If [followLinks] is false, then any symbolic links found |
291 * are reported as [Link] objects, rather than as directories or files, | 291 * are reported as [Link] objects, rather than as directories or files, |
292 * and are not recursed into. | 292 * and are not recursed into. |
293 * | 293 * |
294 * If [followLinks] is true, then working links are reported as | 294 * If [followLinks] is true, then working links are reported as |
295 * directories or files, depending on | 295 * directories or files, depending on |
296 * their type, and links to directories are recursed into. | 296 * their type, and links to directories are recursed into. |
297 * Broken links are reported as [Link] objects. | 297 * Broken links are reported as [Link] objects. |
298 * If a link makes a loop in the file system, then a recursive | 298 * If a link makes a loop in the file system, then a recursive |
299 * listing will not follow a link twice in the | 299 * listing will not follow a link twice in the |
300 * same recursive descent, but will report it as a [Link] | 300 * same recursive descent, but will report it as a [Link] |
301 * the second time it is seen. | 301 * the second time it is seen. |
302 * | 302 * |
303 * Returns a [List] containing [FileSystemEntity] objects for the | 303 * Returns a [List] containing [FileSystemEntity] objects for the |
304 * directories, files, and links. | 304 * directories, files, and links. |
305 */ | 305 */ |
306 List<FileSystemEntity> listSync({bool recursive: false, | 306 List<FileSystemEntity> listSync( |
307 bool followLinks: true}); | 307 {bool recursive: false, bool followLinks: true}); |
308 | 308 |
309 /** | 309 /** |
310 * Returns a human readable string for this Directory instance. | 310 * Returns a human readable string for this Directory instance. |
311 */ | 311 */ |
312 String toString(); | 312 String toString(); |
313 } | 313 } |
OLD | NEW |