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 /** | 5 /** |
| 6 * [Directory] objects are used for working with directories. | 6 * [Directory] objects are used for working with directories. |
| 7 */ | 7 */ |
| 8 interface Directory default _Directory { | 8 interface Directory default _Directory { |
| 9 /** | 9 /** |
| 10 * Creates a directory object. The path is either a full path or | 10 * Creates a directory object. The path is either an absolute path, |
| 11 * relative to the directory in which the Dart VM was | 11 * or it is a relative path which is interpreted relative to the directory |
| 12 * started. | 12 * in which the Dart VM was started. |
| 13 */ | 13 */ |
| 14 Directory(String path); | 14 Directory(String path); |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Creates a directory object from a Path object. The path is either | |
| 18 * an absolute path, or it is a relative path which is interpreted | |
| 19 * relative to the directory in which the Dart VM was started. | |
| 20 */ | |
| 21 Directory.fromPath(Path path); | |
|
Søren Gjesse
2012/06/22 08:06:12
I know that it would be a breaking change, but sho
Bill Hesse
2012/06/22 10:35:33
I'd like to make breaking changes once we are more
| |
| 22 | |
| 23 /** | |
| 17 * Creates a directory object pointing to the current working | 24 * Creates a directory object pointing to the current working |
| 18 * directory. | 25 * directory. |
| 19 */ | 26 */ |
| 20 Directory.current(); | 27 Directory.current(); |
| 21 | 28 |
| 22 /** | 29 /** |
| 23 * Check whether a directory with this name already exists. Returns | 30 * Check whether a directory with this name already exists. Returns |
| 24 * a [:Future<bool>:] that completes with the result. | 31 * a [:Future<bool>:] that completes with the result. |
| 25 */ | 32 */ |
| 26 Future<bool> exists(); | 33 Future<bool> exists(); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 if (path != null) { | 192 if (path != null) { |
| 186 sb.add(", path = $path"); | 193 sb.add(", path = $path"); |
| 187 } | 194 } |
| 188 } | 195 } |
| 189 return sb.toString(); | 196 return sb.toString(); |
| 190 } | 197 } |
| 191 final String message; | 198 final String message; |
| 192 final String path; | 199 final String path; |
| 193 final OSError osError; | 200 final OSError osError; |
| 194 } | 201 } |
| OLD | NEW |