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

Side by Side Diff: runtime/bin/process.dart

Issue 9108008: Add optional workingDirectory argument to Process.start. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 interface Process default _Process { 5 interface Process default _Process {
6 /** 6 /**
7 * Creates a new process object and starts a process running the executable 7 * Creates a new process object and starts a process running the
8 * found at [path] with the specified [arguments]. When the process has 8 * [executable] with the specified [arguments]. When the process has been
9 * been successfully started the [startHandler] is called. If the process 9 * successfully started the [startHandler] is called. If the process fails
10 * fails to start the [errorHandler] is called. 10 * to start the [errorHandler] is called.
11 *
12 * An optional [workingDirectory] can be passed to specify where the process
13 * is run from. Note that the change of directory occurs before executing
14 * the process on some platforms, which may have impact when using relative
15 * paths for [executable] and [arguments].
11 * 16 *
12 * No data can be written to the process stdin and the process cannot be 17 * No data can be written to the process stdin and the process cannot be
13 * closed nor killed before the [startHandler] has been invoked. 18 * closed nor killed before the [startHandler] has been invoked.
14 */ 19 */
15 Process.start(String path, List<String> arguments); 20 Process.start(String executable,
21 List<String> arguments,
22 [String workingDirectory]);
16 23
17 /** 24 /**
18 * Returns an input stream of the process stdout. 25 * Returns an input stream of the process stdout.
19 */ 26 */
20 InputStream get stdout(); 27 InputStream get stdout();
21 28
22 /** 29 /**
23 * Returns an input stream of the process stderr. 30 * Returns an input stream of the process stderr.
24 */ 31 */
25 InputStream get stderr(); 32 InputStream get stderr();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 /** 78 /**
72 * Contains the system message for the process exception if any. 79 * Contains the system message for the process exception if any.
73 */ 80 */
74 final String message; 81 final String message;
75 82
76 /** 83 /**
77 * Contains the OS error code for the process exception if any. 84 * Contains the OS error code for the process exception if any.
78 */ 85 */
79 final int errorCode; 86 final int errorCode;
80 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698