| 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 * Helper functionality to make working with IO easier. | 6 * Helper functionality to make working with IO easier. |
| 7 */ | 7 */ |
| 8 #library('pub_io'); | 8 #library('io'); |
| 9 | 9 |
| 10 #import('dart:io'); | 10 #import('dart:io'); |
| 11 | 11 |
| 12 /** Gets the current working directory. */ | 12 /** Gets the current working directory. */ |
| 13 String get workingDir() => new File('.').fullPathSync(); | 13 String get workingDir() => new File('.').fullPathSync(); |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Prints the given string to `stderr` on its own line. | 16 * Prints the given string to `stderr` on its own line. |
| 17 */ | 17 */ |
| 18 void printError(value) { | 18 void printError(value) { |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 } | 382 } |
| 383 | 383 |
| 384 /** | 384 /** |
| 385 * Gets a [Directory] for [entry], which can either already be one, or be a | 385 * Gets a [Directory] for [entry], which can either already be one, or be a |
| 386 * [String]. | 386 * [String]. |
| 387 */ | 387 */ |
| 388 Directory _getDirectory(entry) { | 388 Directory _getDirectory(entry) { |
| 389 if (entry is Directory) return entry; | 389 if (entry is Directory) return entry; |
| 390 return new Directory(entry); | 390 return new Directory(entry); |
| 391 } | 391 } |
| OLD | NEW |