Chromium Code Reviews| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 * a tutorial about writing command-line apps, includes information | 111 * a tutorial about writing command-line apps, includes information |
| 112 * about files and directories. | 112 * about files and directories. |
| 113 */ | 113 */ |
| 114 abstract class Directory extends FileSystemEntity { | 114 abstract class Directory extends FileSystemEntity { |
| 115 /** | 115 /** |
| 116 * Gets the path of this directory. | 116 * Gets the path of this directory. |
| 117 */ | 117 */ |
| 118 final String path; | 118 final String path; |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Creates a directory object. The path is either an absolute path, | 121 * Creates a [Directory] object. |
| 122 * or it is a relative path which is interpreted relative to the directory | 122 * |
| 123 * in which the Dart VM was started. | 123 * The path is either an absolute path, |
|
Søren Gjesse
2014/05/13 15:45:02
How about rephrasing to something like:
If the pa
Anders Johnsen
2014/05/14 08:51:10
Done.
| |
| 124 * or it is a relative path which is interpreted relative to the current | |
| 125 * working directory (see [Directory.current]). | |
| 124 */ | 126 */ |
| 125 factory Directory(String path) => new _Directory(path); | 127 factory Directory(String path) => new _Directory(path); |
| 126 | 128 |
| 127 /** | 129 /** |
| 128 * Create a Directory object from a URI. | 130 * Create a Directory object from a URI. |
| 129 * | 131 * |
| 130 * If [uri] cannot reference a directory this throws [UnsupportedError]. | 132 * If [uri] cannot reference a directory this throws [UnsupportedError]. |
| 131 */ | 133 */ |
| 132 factory Directory.fromUri(Uri uri) => new Directory(uri.toFilePath()); | 134 factory Directory.fromUri(Uri uri) => new Directory(uri.toFilePath()); |
| 133 | 135 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 * directories, files, and links. | 293 * directories, files, and links. |
| 292 */ | 294 */ |
| 293 List<FileSystemEntity> listSync({bool recursive: false, | 295 List<FileSystemEntity> listSync({bool recursive: false, |
| 294 bool followLinks: true}); | 296 bool followLinks: true}); |
| 295 | 297 |
| 296 /** | 298 /** |
| 297 * Returns a human readable string for this Directory instance. | 299 * Returns a human readable string for this Directory instance. |
| 298 */ | 300 */ |
| 299 String toString(); | 301 String toString(); |
| 300 } | 302 } |
| OLD | NEW |