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 implements FileSystemEntity { | 10 abstract class Directory implements FileSystemEntity { |
11 /** | 11 /** |
12 * Creates a directory object. The path is either an absolute path, | 12 * 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 | 13 * or it is a relative path which is interpreted relative to the directory |
14 * in which the Dart VM was started. | 14 * in which the Dart VM was started. |
15 */ | 15 */ |
16 factory Directory(String path) => new _Directory(path); | 16 factory Directory(String path) => new _Directory(path); |
17 | 17 |
18 /** | 18 /** |
19 * Creates a directory object from a Path object. The path is either | |
20 * an absolute path, or it is a relative path which is interpreted | |
21 * relative to the directory in which the Dart VM was started. | |
22 */ | |
23 @deprecated | |
24 factory Directory.fromPath(Path path) => new _Directory.fromPath(path); | |
25 | |
26 /** | |
27 * Creates a directory object pointing to the current working | 19 * Creates a directory object pointing to the current working |
28 * directory. | 20 * directory. |
29 */ | 21 */ |
30 static Directory get current => _Directory.current; | 22 static Directory get current => _Directory.current; |
31 | 23 |
32 /** | 24 /** |
33 * Sets the current working directory of the Dart process including | 25 * Sets the current working directory of the Dart process including |
34 * all running isolates. The new value set can be either a [Directory] | 26 * all running isolates. The new value set can be either a [Directory] |
35 * or a [String]. | 27 * or a [String]. |
36 * | 28 * |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 if (path != null) { | 223 if (path != null) { |
232 sb.write(", path = $path"); | 224 sb.write(", path = $path"); |
233 } | 225 } |
234 } | 226 } |
235 return sb.toString(); | 227 return sb.toString(); |
236 } | 228 } |
237 final String message; | 229 final String message; |
238 final String path; | 230 final String path; |
239 final OSError osError; | 231 final OSError osError; |
240 } | 232 } |
OLD | NEW |