Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: sdk/lib/io/process.dart

Issue 16309014: Add support for binary stdout/stderr data when using Process.run (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed debug print Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 void _exit(int status); 10 external static void _exit(int status);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 * [ProcessResult] represents the result of running a non-interactive 193 * [ProcessResult] represents the result of running a non-interactive
194 * process started with [:Process.run:]. 194 * process started with [:Process.run:].
195 */ 195 */
196 abstract class ProcessResult { 196 abstract class ProcessResult {
197 /** 197 /**
198 * Exit code for the process. 198 * Exit code for the process.
199 */ 199 */
200 int get exitCode; 200 int get exitCode;
201 201
202 /** 202 /**
203 * Standard output from the process as a string. 203 * Standard output from the process. The value used for the
204 * `stdoutEncoding` argument to `Process.run` determins the type. If
205 * `Encoding.BINARY` was used this value is of type `List<int>
206 * otherwise it is of type `String`.
204 */ 207 */
205 String get stdout; 208 get stdout;
206 209
207 /** 210 /**
208 * Standard error from the process as a string. 211 * Standard error from the process. The value used for the
212 * `stderrEncoding` argument to `Process.run` determins the type. If
213 * `Encoding.BINARY` was used this value is of type `List<int>
214 * otherwise it is of type `String`.
209 */ 215 */
210 String get stderr; 216 get stderr;
211 217
212 /** 218 /**
213 * Process id from the process. 219 * Process id from the process.
214 */ 220 */
215 int get pid; 221 int get pid;
216 } 222 }
217 223
218 224
219 /** 225 /**
220 * On Posix systems, [ProcessSignal] is used to send a specific signal 226 * On Posix systems, [ProcessSignal] is used to send a specific signal
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 /** 285 /**
280 * Contains the system message for the process exception if any. 286 * Contains the system message for the process exception if any.
281 */ 287 */
282 final String message; 288 final String message;
283 289
284 /** 290 /**
285 * Contains the OS error code for the process exception if any. 291 * Contains the OS error code for the process exception if any.
286 */ 292 */
287 final int errorCode; 293 final int errorCode;
288 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698