Chromium Code Reviews| 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 // TODO(ager): The only reason for this class is that we | 7 // TODO(ager): The only reason for this class is that we |
| 8 // cannot patch a top-level at this point. | 8 // cannot patch a top-level at this point. |
| 9 class _ProcessUtils { | 9 class _ProcessUtils { |
| 10 external static _exit(int status); | 10 external static _exit(int status); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 * | 72 * |
| 73 * Returns a [:Future<ProcessResult>:] that completes with the | 73 * Returns a [:Future<ProcessResult>:] that completes with the |
| 74 * result of running the process, i.e., exit code, standard out and | 74 * result of running the process, i.e., exit code, standard out and |
| 75 * standard in. | 75 * standard in. |
| 76 */ | 76 */ |
| 77 external static Future<ProcessResult> run(String executable, | 77 external static Future<ProcessResult> run(String executable, |
| 78 List<String> arguments, | 78 List<String> arguments, |
| 79 [ProcessOptions options]); | 79 [ProcessOptions options]); |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * Returns an input stream of the process stdout. | 82 * Returns the standard output stream of the process as a [:Stream:]. |
|
Søren Gjesse
2013/02/25 09:15:05
For consistency either remove ::'s here or add the
Bill Hesse
2013/02/25 14:55:25
But IOSink is a class in this library, and the lin
| |
| 83 * | 83 * |
| 84 * Throws an [UnsupportedError] if the process is | 84 * Throws an [UnsupportedError] if the process is |
| 85 * non-interactive. | 85 * non-interactive. |
| 86 */ | 86 */ |
| 87 Stream<List<int>> get stdout; | 87 Stream<List<int>> get stdout; |
| 88 | 88 |
| 89 /** | 89 /** |
| 90 * Returns an input stream of the process stderr. | 90 * Returns the standard error stream of the process as a [:Stream:]. |
| 91 * | 91 * |
| 92 * Throws an [UnsupportedError] if the process is | 92 * Throws an [UnsupportedError] if the process is |
| 93 * non-interactive. | 93 * non-interactive. |
| 94 */ | 94 */ |
| 95 Stream<List<int>> get stderr; | 95 Stream<List<int>> get stderr; |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * Returns an output stream to the process stdin. | 98 * Returns the standard input stream of the process as an [IOSink]. |
| 99 * | 99 * |
| 100 * Throws an [UnsupportedError] if the process is | 100 * Throws an [UnsupportedError] if the process is |
| 101 * non-interactive. | 101 * non-interactive. |
| 102 */ | 102 */ |
| 103 IOSink<Process> get stdin; | 103 IOSink<Process> get stdin; |
| 104 | 104 |
| 105 /** | 105 /** |
| 106 * Sets an exit handler which gets invoked when the process | 106 * Returns a [:Future:] which completes with the exit code of the process |
| 107 * terminates. | 107 * when the process completes. |
| 108 * | 108 * |
| 109 * Throws an [UnsupportedError] if the process is | 109 * Throws an [UnsupportedError] if the process is |
| 110 * non-interactive. | 110 * non-interactive. |
| 111 */ | 111 */ |
| 112 Future<int> exitCode; | 112 Future<int> exitCode; |
| 113 | 113 |
| 114 /** | 114 /** |
| 115 * On Windows, [kill] kills the process, ignoring the [signal] | 115 * On Windows, [kill] kills the process, ignoring the [signal] |
| 116 * flag. On Posix systems, [kill] sends [signal] to the | 116 * flag. On Posix systems, [kill] sends [signal] to the |
| 117 * process. Depending on the signal giving, it'll have different | 117 * process. Depending on the signal giving, it'll have different |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 /** | 259 /** |
| 260 * Contains the system message for the process exception if any. | 260 * Contains the system message for the process exception if any. |
| 261 */ | 261 */ |
| 262 final String message; | 262 final String message; |
| 263 | 263 |
| 264 /** | 264 /** |
| 265 * Contains the OS error code for the process exception if any. | 265 * Contains the OS error code for the process exception if any. |
| 266 */ | 266 */ |
| 267 final int errorCode; | 267 final int errorCode; |
| 268 } | 268 } |
| OLD | NEW |