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 abstract class Directory implements FileSystemEntity { | 10 abstract class Directory implements FileSystemEntity { |
11 /** | 11 /** |
| 12 * Gets the path of this directory. |
| 13 */ |
| 14 final String path; |
| 15 |
| 16 /** |
12 * Creates a directory object. The path is either an absolute path, | 17 * Creates a directory object. The path is either an absolute path, |
13 * or it is a relative path which is interpreted relative to the directory | 18 * or it is a relative path which is interpreted relative to the directory |
14 * in which the Dart VM was started. | 19 * in which the Dart VM was started. |
15 */ | 20 */ |
16 factory Directory(String path) => new _Directory(path); | 21 factory Directory(String path) => new _Directory(path); |
17 | 22 |
18 /** | 23 /** |
19 * Create a Directory object from a URI. | 24 * Create a Directory object from a URI. |
20 * | 25 * |
21 * If [uri] cannot reference a directory this throws [UnsupportedError]. | 26 * If [uri] cannot reference a directory this throws [UnsupportedError]. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 * Returns a [List] containing [FileSystemEntity] objects for the | 186 * Returns a [List] containing [FileSystemEntity] objects for the |
182 * directories, files, and links. | 187 * directories, files, and links. |
183 */ | 188 */ |
184 List<FileSystemEntity> listSync({bool recursive: false, | 189 List<FileSystemEntity> listSync({bool recursive: false, |
185 bool followLinks: true}); | 190 bool followLinks: true}); |
186 | 191 |
187 /** | 192 /** |
188 * Returns a human readable string for this Directory instance. | 193 * Returns a human readable string for this Directory instance. |
189 */ | 194 */ |
190 String toString(); | 195 String toString(); |
191 | |
192 /** | |
193 * Gets the path of this directory. | |
194 */ | |
195 final String path; | |
196 } | 196 } |
OLD | NEW |