| 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 * A Directory instance is an object holding a [path] on which operations can | 10 * A Directory instance is an object holding a [path] on which operations can |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 /** | 153 /** |
| 154 * Sets the current working directory of the Dart process including | 154 * Sets the current working directory of the Dart process including |
| 155 * all running isolates. The new value set can be either a [Directory] | 155 * all running isolates. The new value set can be either a [Directory] |
| 156 * or a [String]. | 156 * or a [String]. |
| 157 * | 157 * |
| 158 * The new value is passed to the OS's system call unchanged, so a | 158 * The new value is passed to the OS's system call unchanged, so a |
| 159 * relative path passed as the new working directory will be | 159 * relative path passed as the new working directory will be |
| 160 * resolved by the OS. | 160 * resolved by the OS. |
| 161 * | 161 * |
| 162 * Note that setting the current working directory is a synchronous | 162 * Note that setting the current working directory is a synchronous |
| 163 * operation and that it changes the the working directory of *all* | 163 * operation and that it changes the working directory of *all* |
| 164 * isolates. | 164 * isolates. |
| 165 * | 165 * |
| 166 * Use this with care - especially when working with asynchronous | 166 * Use this with care - especially when working with asynchronous |
| 167 * operations and multiple isolates. Changing the working directory, | 167 * operations and multiple isolates. Changing the working directory, |
| 168 * while asynchronous operations are pending or when other isolates | 168 * while asynchronous operations are pending or when other isolates |
| 169 * are working with the file system, can lead to unexpected results. | 169 * are working with the file system, can lead to unexpected results. |
| 170 */ | 170 */ |
| 171 static void set current(path) { | 171 static void set current(path) { |
| 172 _Directory.current = path; | 172 _Directory.current = path; |
| 173 } | 173 } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 * directories, files, and links. | 304 * directories, files, and links. |
| 305 */ | 305 */ |
| 306 List<FileSystemEntity> listSync({bool recursive: false, | 306 List<FileSystemEntity> listSync({bool recursive: false, |
| 307 bool followLinks: true}); | 307 bool followLinks: true}); |
| 308 | 308 |
| 309 /** | 309 /** |
| 310 * Returns a human readable string for this Directory instance. | 310 * Returns a human readable string for this Directory instance. |
| 311 */ | 311 */ |
| 312 String toString(); | 312 String toString(); |
| 313 } | 313 } |
| OLD | NEW |