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 a full path or |
11 * relative to the directory in which the Dart VM was | 11 * relative to the directory in which the Dart VM was |
12 * started. | 12 * started. |
13 */ | 13 */ |
14 Directory(String path); | 14 Directory(String path); |
15 | 15 |
16 /** | 16 /** |
17 * Creates a directory object pointing to the current working | |
18 * diimdirectory. | |
Mads Ager (google)
2012/03/07 13:12:21
diim! ;-)
| |
19 */ | |
20 Directory.current(); | |
21 | |
22 /** | |
17 * Check whether a directory with this name already exists. If the | 23 * Check whether a directory with this name already exists. If the |
18 * operation completes successfully the callback is called with the | 24 * operation completes successfully the callback is called with the |
19 * result. Otherwise [onError] is called. | 25 * result. Otherwise [onError] is called. |
20 */ | 26 */ |
21 void exists(void callback(bool exists)); | 27 void exists(void callback(bool exists)); |
22 | 28 |
23 /** | 29 /** |
24 * Synchronously check whether a directory with this name already exists. | 30 * Synchronously check whether a directory with this name already exists. |
25 */ | 31 */ |
26 bool existsSync(); | 32 bool existsSync(); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 final String path; | 143 final String path; |
138 } | 144 } |
139 | 145 |
140 | 146 |
141 class DirectoryException { | 147 class DirectoryException { |
142 const DirectoryException([String this.message, int this.errorCode = 0]); | 148 const DirectoryException([String this.message, int this.errorCode = 0]); |
143 String toString() => "DirectoryException: $message"; | 149 String toString() => "DirectoryException: $message"; |
144 final String message; | 150 final String message; |
145 final int errorCode; | 151 final int errorCode; |
146 } | 152 } |
OLD | NEW |