#REFACTORING by cg
class: OSProcess
comment/format in: #command:
class: OSProcess class
added:
#command:
#command:inDirectory:
--- a/OSProcess.st Wed Jan 17 13:31:40 2018 +0100
+++ b/OSProcess.st Wed Jan 17 13:35:40 2018 +0100
@@ -109,6 +109,20 @@
!OSProcess class methodsFor:'instance creation'!
+command:aCommandString
+ "return an initialized instance to execute aCommandStirng
+ in the current directory for a local process"
+
+ ^ self new command:aCommandString.
+!
+
+command:aCommandString inDirectory:aStringOrFilename
+ "return an initialized instance to execute aCommandStirng
+ in a directory for a local process"
+
+ ^ self new command:aCommandString inDirectory:aStringOrFilename.
+!
+
new
"return an initialized instance for a local process"
@@ -159,13 +173,13 @@
"Created: / 10.11.1998 / 21:27:07 / cg"
!
-command:aStringOrArray
+command:aStringOrArray
"set the command to be executed.
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 := aStringOrArray.
!