#DOCUMENTATION by cg
class: OSProcess
comment/format in:
#command
#command:directory:
#command:environment:directory:inStream:outStream:errorStream:auxStream:showWindow:lineWise:
#directory
#environment
#errorStream
#inStream
#outStream
class: OSProcess class
added: #command:directory:
removed: #command:inDirectory:
--- a/OSProcess.st Wed Jan 17 13:35:40 2018 +0100
+++ b/OSProcess.st Wed Jan 17 13:39:11 2018 +0100
@@ -116,11 +116,11 @@
^ self new command:aCommandString.
!
-command:aCommandString inDirectory:aStringOrFilename
+command:aCommandString directory:aStringOrFilename
"return an initialized instance to execute aCommandStirng
in a directory for a local process"
- ^ self new command:aCommandString inDirectory:aStringOrFilename.
+ ^ self new command:aCommandString directory:aStringOrFilename.
!
new
@@ -166,7 +166,7 @@
!
command
- "return the value of the instance variable 'command' (automatically generated)"
+ "the OS (shell-) command"
^ command
@@ -184,11 +184,21 @@
!
command:commandStringArg directory:stringOrFilenameArg
+ "set the command to be executed and directory, where to execute.
+ If aStringOrArray is a String, the commandString is passed to a shell for execution
+ - see the description of 'sh -c' in your UNIX manual ('cmd.exe' in your Windows manual).
+ If aCommandString is an Array, the first element is the command to be executed,
+ and the other elements are the arguments to the command. No shell is invoked in this case."
+
command := commandStringArg.
directory := stringOrFilenameArg.
!
command:commandArg environment:environmentArg directory:directoryArg inStream:inStreamArg outStream:outStreamArg errorStream:errorStreamArg auxStream:auxStreamArg showWindow:showWindowArg lineWise:lineWiseArg
+ "set the command to be executed & directory, where to execute.
+ and input/output streams.
+ See comments in individual setters for more info"
+
command := commandArg.
environment := environmentArg.
directory := directoryArg.
@@ -201,7 +211,7 @@
!
directory
- "return the value of the instance variable 'directory' (automatically generated)"
+ "the directory where executed"
^ directory
@@ -215,7 +225,7 @@
!
environment
- "return the value of the instance variable 'environment' (automatically generated)"
+ "the shell environment"
^ environment
@@ -229,8 +239,6 @@
!
errorStream
- "return the value of the instance variable 'errorStream' (automatically generated)"
-
^ errorStream
"Created: / 10.11.1998 / 21:26:34 / cg"
@@ -266,8 +274,6 @@
!
inStream
- "return the value of the instance variable 'inStream' (automatically generated)"
-
^ inStream
"Created: / 10.11.1998 / 21:26:34 / cg"
@@ -303,8 +309,6 @@
!
outStream
- "return the value of the instance variable 'outStream' (automatically generated)"
-
^ outStream
"Created: / 10.11.1998 / 21:26:34 / cg"