Chromium Code Reviews| Index: sdk/lib/io/directory.dart |
| diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart |
| index 8c0ad5abd05cf07d234a26a0e0a001a8241cd45d..a3b7fccddb9ae536d69bacfb1ef32243300e7278 100644 |
| --- a/sdk/lib/io/directory.dart |
| +++ b/sdk/lib/io/directory.dart |
| @@ -26,7 +26,27 @@ abstract class Directory extends FileSystemEntity { |
| * Creates a directory object pointing to the current working |
| * directory. |
| */ |
| - factory Directory.current() => new _Directory.current(); |
| + static Directory get current => _Directory.current; |
| + |
| + /** |
| + * Sets the current working directory of the Dart process including |
| + * all running isolates. The value set can be either a [Directory] |
|
Bill Hesse
2013/04/29 11:01:12
The new value
Søren Gjesse
2013/04/29 11:59:15
Done.
|
| + * or a [String]. |
| + * |
| + * The value set is passed directly to the underlying system call |
|
Bill Hesse
2013/04/29 11:01:12
The new value is passed to the OS's system call un
Søren Gjesse
2013/04/29 11:59:15
Done.
|
| + * which will take care of resolving relative paths is a relative |
| + * path is passed. |
| + * |
| + * Note that setting the current working directory is a synchronous |
| + * operation and that it changes the the working directory of *all* |
| + * isolates. |
| + * |
| + * Use this with care - especially when working with asynchronous |
| + * operations and multiple isolates. Changing the working directory, |
| + * while asynchronous operations are pending or when other isolates |
| + * are working with the file system, can lead to unexpected results. |
| + */ |
| + static void set current(path) => _Directory.current = path; |
| /** |
| * Check whether a directory with this name already exists. Returns |