#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Wed, 17 Jan 2018 13:35:40 +0100
changeset 22437 2eab35976e5e
parent 22436 be3edafe55cc
child 22438 7f0d16f4a407
#REFACTORING by cg class: OSProcess comment/format in: #command: class: OSProcess class added: #command: #command:inDirectory:
OSProcess.st
--- 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.
 !